今天在要php5.4.6中編譯安裝一個php-screw了,但是怎么操作都不成功了,后來看到有朋友博客寫到一篇關于php-screw在php5.4.6上編譯失敗問題的解決方案,于是拿過來試了一下沒想到還真解決了,下面我把文章拿出來與大家一起分享.
php-screw版本問題,報錯
- make
- /bin/sh /root/php_screw-1.5/libtool --mode=compile cc -I. -I/root/php_screw-1.5 -DPHP_ATOM_INC -I/root/php_screw-1.5/include -I/root/php_screw-1.5/main -I/root/php_screw-1.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php_screw-1.5/php_screw.c -o php_screw.lo
- libtool: compile: cc -I. -I/root/php_screw-1.5 -DPHP_ATOM_INC -I/root/php_screw-1.5/include -I/root/php_screw-1.5/main -I/root/php_screw-1.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php_screw-1.5/php_screw.c -fPIC -DPIC -o .libs/php_screw.o
- /root/php_screw-1.5/php_screw.c: In function ‘zm_startup_php_screw’:
- /root/php_screw-1.5/php_screw.c:124: error: ‘struct _zend_compiler_globals’ has no member named ‘extended_info’
- /root/php_screw-1.5/php_screw.c: In function ‘zm_shutdown_php_screw’:
- /root/php_screw-1.5/php_screw.c:133: error: ‘struct _zend_compiler_globals’ has no member named ‘extended_info’
- make: *** [php_screw.lo] Error 1
修改php-screw.c
修改 CG(extended_info) = 1;為 CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
新聞熱點
疑難解答