安装好zendOptimizer之后,使用’php -v’显示安装正常:
但是用函数phpinfo确看不到zendOptimizer的信息:

纳闷!纳闷!纳闷~ 翻开Zend Optimizer User Guide 看了一下,Troublesshooting里提示去查看一下apache错误日志(See message in the Web server log file),查看apache的error_log,里面不少类似这样的错误: Failed loading /usr/local/Zend/lib/ZendExtensionManager.so: /usr/local/Zend/lib/ZendExtensionManager.so: undefined symbol: zend_extensions Google了一下,问题应该是出在php编译上。 找到原来的编译目录,重新载入参数,然后加上—disable-versioning 重新configure
编译参数:

1
2
3
./configure —with-apxs2=/usr/local/apache/bin/apxs —with-zlib —with-gd —with-ttf —with-png —with-expat-dir=/usr —with-gmp —with-xml —with-mysql=/usr/local/mysql —disable-debug —disable-posix —disable-rpath —enable-safe-mode —enable-magic-quotes —disable-dmalloc —enable-bcmath —enable-dio —enable-gd-native-ttf —enable-sysvsem —enable-sysvshm —enable-wddx —enable-versioning —enable-pic —enable-inline-optimization —enable-memory-limit —enable-mbstring —enable-mbregex —enable-mbstr-enc-trans —with-config-file-path=/usr/local/lib —enable-ftp —disable-debug —enable-track-vars=yes —with-jpeg-dir —with-freetype-dir —enable-gd-native-ttf —enable-dl —with-kerberos —disable-versioning

然后

make,make install
`
重起apache ,zendOptimizer不必重新安装 ,用’php -v ‘ 和 phpinfo()查看均正常