How to compile php extension for PHP 5.3.6 with debug, TS
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
精彩评论