开发者

How to compile php extension for PHP 5.3.6 with debug, TS

开发者 https://www.devze.com 2023-03-15 10:42 出处:网络
I\'ve tried to create some php extension. For the first I compiled php 5.3.6 with --enable-debug --enable-maintainer-zts.

I've tried to create some php extension.

For the first I compiled php 5.3.6 with --enable-debug --enable-maintainer-zts. Then I ceated my extension and use standart procedure for it

phpize
./configure --with-EXTNAME
make

Then copy extname.so to my php extensions directory, and change php.ini

And when I try to use php from cli I got an error

Unable to initialize module
Module compiled with build ID=API20090626,NTS
PHP    compiled with build ID=API20090626,TS,debug

When I try

./configure --enable-debug --enable-maintainer-zts

For extension I got warning that these options are not recognized by configure script.

开发者_开发问答

So, how can I compile my extension to use with PHP compiled with options that I describer above without recompiling php itself?


You need ./configure --with-php-config=/path/to/correct/php-config.

The configure script is likely using another php-config (likely the centrally installed one).


in my server there are 2 phpize

  /usr/bin/php/phpize
  /usr/bin/php-zts/phpize

to make sure it compiled with Thread Safety instead using "phpize" do

/usr/bin/php-zts/phpize
./configure --with-php-config=/usr/bin/php-zts/php-config
make
make install 
0

精彩评论

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

关注公众号