开发者

where to add php extension name to compile it with other extensions

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:

  1. $ cd ..
  2. $ vi ext/my_module/config.m4
  3. $ ./buildconf
  4. $ ./configure --[with|enable]-my_module
  5. $ make
  6. $ ./php -f ext/my_module/my_module.php
  7. $ vi ext/my_module/my_module.c
  8. $ 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜