Home
News
Forum
Wiki
Blog
Contents
Gallery
Movies
Downloads
About NSL
[
List of Titles
|
List of Pages
|
New
|
Search
|
Recent changes
|
Help
]
PHP Extension
[
Front page
]
[ ]
Start:
* [[PHP]] 関数拡張
** Trouble Shooting
**** dl() でモジュールを呼んでくれない
- php.ini で enable_dl = On とする.
#br
**** php.ini の設定が反映されない
- php -i |grep php.ini で PHPが実際に読み込んでいる php....
- PHPが WWWサーバのモジュールとしてではなく,php-fpm で動...
systemctl restart php-fpm
#br
** Tips
**** 有効な php.ini を探す
php --ini|grep php.ini
#br
*** 実装例
- http://www.nsl.tuis.ac.jp/svn/linux/authd/trunk/php
#br
** PHP8
*** xmlrpc
- PHP8 で標準から外れる
#br
**** ソースからコンパイルする場合は
--with-xmlrpc
#br
**** パッケージに入れる場合
yum install php-pear
yum install php-devel
pecl search xmlrpc
pecl install xmlrpc (エラー)
pecl install channel://pecl.php.net/xmlrpc-1.0.0RC3
vi /etc/php.ini (add
extension = xml.so
extension = xmlrpc.so
systemctl restart php-fpm
- undefined symbol: php_XML_GetCurrentColumnNumber のエラ...
-- php.ini に extension = xml.so を追加
#br
** PHP7
*** サンプル実行
**** PHP と 拡張機能(サンプル)をコンパイル
cd [php-dorce-dir]
cd ext
./ext_skel --extname=ext_test
vi ext_test/config.m4 L10-13をコメントアウト(--with-ext...
cd ..
./buildconf --force
./configure --with-ext_test
make
**** 実行 (テスト)
- ./sapi/cli/php -f ext/ext_test/ext_test.php
-- ''Congratulations! You have successfully modified ext/...
#br
**** モジュール (ext_test.so) を作る
cd ext/ext_test
phpize
./configure
make
- ./modules/ext_test.so ができる
#br
** PHP5
*** サンプル実行
**** PHP のコンパイル
cd [php-dorce-dir]
./configure
make
**** 拡張機能(サンプル)をコンパイル
cd ext
./ext_skel --extname=ext_test
cd ext/ext_test
config.m4 L10-13をコメントアウト(--with-ext_test 関連)
phpize
./configure
make
**** 実行 (テスト)
- モジュール(/modules/ext_test.so)を所定のディレクトリ...
- または: php -d extension_dir=./modules ext_test.php
-- ''Congratulations! You have successfully modified ext/...
#br
*** Extensions
- [[Sodium>./Sodium]]
#br
End:
* [[PHP]] 関数拡張
** Trouble Shooting
**** dl() でモジュールを呼んでくれない
- php.ini で enable_dl = On とする.
#br
**** php.ini の設定が反映されない
- php -i |grep php.ini で PHPが実際に読み込んでいる php....
- PHPが WWWサーバのモジュールとしてではなく,php-fpm で動...
systemctl restart php-fpm
#br
** Tips
**** 有効な php.ini を探す
php --ini|grep php.ini
#br
*** 実装例
- http://www.nsl.tuis.ac.jp/svn/linux/authd/trunk/php
#br
** PHP8
*** xmlrpc
- PHP8 で標準から外れる
#br
**** ソースからコンパイルする場合は
--with-xmlrpc
#br
**** パッケージに入れる場合
yum install php-pear
yum install php-devel
pecl search xmlrpc
pecl install xmlrpc (エラー)
pecl install channel://pecl.php.net/xmlrpc-1.0.0RC3
vi /etc/php.ini (add
extension = xml.so
extension = xmlrpc.so
systemctl restart php-fpm
- undefined symbol: php_XML_GetCurrentColumnNumber のエラ...
-- php.ini に extension = xml.so を追加
#br
** PHP7
*** サンプル実行
**** PHP と 拡張機能(サンプル)をコンパイル
cd [php-dorce-dir]
cd ext
./ext_skel --extname=ext_test
vi ext_test/config.m4 L10-13をコメントアウト(--with-ext...
cd ..
./buildconf --force
./configure --with-ext_test
make
**** 実行 (テスト)
- ./sapi/cli/php -f ext/ext_test/ext_test.php
-- ''Congratulations! You have successfully modified ext/...
#br
**** モジュール (ext_test.so) を作る
cd ext/ext_test
phpize
./configure
make
- ./modules/ext_test.so ができる
#br
** PHP5
*** サンプル実行
**** PHP のコンパイル
cd [php-dorce-dir]
./configure
make
**** 拡張機能(サンプル)をコンパイル
cd ext
./ext_skel --extname=ext_test
cd ext/ext_test
config.m4 L10-13をコメントアウト(--with-ext_test 関連)
phpize
./configure
make
**** 実行 (テスト)
- モジュール(/modules/ext_test.so)を所定のディレクトリ...
- または: php -d extension_dir=./modules ext_test.php
-- ''Congratulations! You have successfully modified ext/...
#br
*** Extensions
- [[Sodium>./Sodium]]
#br
Page:
Site Search
Advanced Search
Login
Username:
Password:
Lost Password?
Register now!!
Sub Menu
New Arrivals
Books
Web Links
Site Map
e-Learning
TUIS Certificate
mini Calendar
May 2025
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Today
Who's Online
98 user(s) are online (7 user(s) are browsing xpwiki)
Members: 0
Guests: 98
more...
Access Counter
Today :
Yesterday :
Total :
Powered by XOOPS Cube 2.1© 2001-2006
XOOPS Cube Project
Design by
XoopsDesign.com