I have created sample php extension using ext_skel command tool.
when I try ./configure --help
from php base folder, my extension does not show up there.
where should I add/enable my extension name so that it will be appeared on ./configure --help
of php.
Note: I can c开发者_运维技巧ompile it separately from php/ext/extname
folder, but I want it compile with from php base with other extensions.
You need to follow these steps :-
:~/cvs/php4/ext:> ./ext_skel --extname=my_module
Creating directory my_module
Creating basic files: config.m4 .cvsignore my_module.c php_my_module.h CREDITS EXPERIMENTAL tests/001.phpt my_module.php [done].
To use your new extension, you will have to execute the following steps:
- $ cd ..
- $ vi ext/my_module/config.m4
- $ ./buildconf
- $ ./configure --[with|enable]-my_module
- $ make
- $ ./php -f ext/my_module/my_module.php
- $ vi ext/my_module/my_module.c
- $ make
Repeat steps 3-6 until you are satisfied with ext/my_module/config.m4 and step 6 confirms that your module is compiled into PHP. Then, start writing code and repeat the last two steps as often as necessary.
You need to run ./buildconf command that will add your extension to the PHP extensions list. After this, you will be able to see your extension by the ./configure -help command.
Please follow document http://php.net/manual/en/internals2.ze1.zendapi.php for more clarification.
精彩评论