- 現在との差分 を表示
- ソース を表示
- PHP Extension へ行く。
1: 2019-08-16 (金) 14:26:19 iseki | 2: 2019-08-16 (金) 15:56:36 iseki | ||
---|---|---|---|
Line 1: | Line 1: | ||
* PHP 関数拡張 [#qf39fc61] | * PHP 関数拡張 [#qf39fc61] | ||
+ | *** 実装例 [#h9cb3f05] | ||
+ | - http://www.nsl.tuis.ac.jp/svn/linux/authd/trunk/php | ||
+ | #br | ||
** PHP7 [#jae4f806] | ** PHP7 [#jae4f806] | ||
+ | *** サンプル実行 [#t033cc47] | ||
+ | |||
+ | **** PHP と 拡張機能(サンプル)をコンパイル [#w67d381b] | ||
+ | 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 | ||
+ | |||
+ | **** 実行 (テスト) [#u6310e48] | ||
+ | - ./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 | ||
+ | #br | ||
+ | |||
+ | **** モジュール (ext_test.so) を作る [#td1b6526] | ||
+ | cd ext/ext_test | ||
+ | phpize | ||
+ | ./configure | ||
+ | make | ||
+ | |||
+ | - ./modules/ext_test.so ができる | ||
+ | #br | ||
+ | |||
** PHP5 [#v5b55d7d] | ** PHP5 [#v5b55d7d] | ||
+ | *** サンプル実行 [#m6b6e697] | ||
+ | |||
+ | **** PHP のコンパイル [#g4318478] | ||
+ | cd [php-dorce-dir] | ||
+ | ./configure | ||
+ | make | ||
+ | |||
+ | **** 拡張機能(サンプル)をコンパイル [#u739f526] | ||
+ | cd ext | ||
+ | ./ext_skel --extname=ext_test | ||
+ | cd ext/ext_test | ||
+ | config.m4 L10-13をコメントアウト(--with-ext_test 関連) | ||
+ | phpize | ||
+ | ./configure | ||
+ | make | ||
+ | |||
+ | **** 実行 (テスト)[#j1177a63] | ||
+ | - モジュール(/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 | ||
+ | #br |
- PHP Extension のバックアップ一覧
- PHP Extension のバックアップ差分(No. All)
- 1: 2019-08-16 (金) 14:26:19 iseki
- 2: 2019-08-16 (金) 15:56:36 iseki
- 3: 2022-09-05 (月) 16:13:42 iseki
- 現: 2023-08-15 (火) 20:34:12 iseki