我试图创建一些PHP扩展.
对于第一个我编php 5.3.6带--enable-debug --enable-maintainer-zts.然后我停止了我的扩展并使用标准程序
phpize
./configure --with-EXTNAME
make
Run Code Online (Sandbox Code Playgroud)
然后复制extname.so到我的php扩展目录,并进行更改php.ini
当我尝试从cli使用php时出现错误
Unable to initialize module
Module compiled with build ID=API20090626,NTS
PHP compiled with build ID=API20090626,TS,debug
Run Code Online (Sandbox Code Playgroud)
当我尝试
./configure --enable-debug --enable-maintainer-zts
Run Code Online (Sandbox Code Playgroud)
对于扩展,我收到警告,配置脚本无法识别这些选项.
那么,我如何编译我的扩展以使用PHP编译我上面描述的选项编译而无需重新编译php本身?
你需要./configure --with-php-config=/path/to/correct/php-config.
配置脚本可能正在使用另一个php-config(可能是集中安装的脚本).