ページ内コンテンツ
PHP 関数拡張 
php.ini の設定が反映されない 
- php -i |grep php.ini で PHPが実際に読み込んでいる php.ini を調べる
- PHPが WWWサーバのモジュールとしてではなく,php-fpm で動いている場合は,php-fpm を再起動する必要がある.
systemctl restart php-fpm
パッケージに入れる場合 
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 を追加
- php.ini に extension = xml.so を追加
PHP と 拡張機能(サンプル)をコンパイル 
cd [php-dorce-dir] cd ext ./ext_skel --extname=ext_test vi ext_test/config.m4 L10-13をコメントアウト(--with-ext_test 関連) cd .. ./buildconf --force ./configure --with-ext_test make
実行 (テスト) 
- ./sapi/cli/php -f ext/ext_test/ext_test.php
- Congratulations! You have successfully modified ext/ext_test/config.m4. Module ext_test is now compiled into PHP. が表示されればOK
- Congratulations! You have successfully modified ext/ext_test/config.m4. Module ext_test is now compiled into PHP. が表示されればOK
拡張機能(サンプル)をコンパイル 
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 ext_test.php
- または: php -d extension_dir=./modules ext_test.php
- Congratulations! You have successfully modified ext/ext_test/config.m4. Module ext_test is now compiled into PHP. が表示されればOK
- Congratulations! You have successfully modified ext/ext_test/config.m4. Module ext_test is now compiled into PHP. が表示されればOK
Counter: 1199,
today: 1,
yesterday: 2
最終更新: 2023-08-15 (火) 20:34:12 (JST) (541d) by iseki