php – 如何在Mac OS X 10.7 Lion上安装适用于XAMPP的eAccelerator
作者:互联网
我在Mac OS X Lion的XAMPP安装上安装eAccelerator时遇到了一些问题.
首先,我遇到了这个问题:
Mohd-Yusufs-MacBook-Pro:APC-3.1.9 mohdyusuf$$PHP_PREFIX/bin/phpize
grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/main/php.h: No such file or directory
grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
所以我通过从XAMPP下载页面安装“Developer package”解决了这个问题.
然后,我遇到了eAccelerator的编译版本的问题:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/eaccelerator.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/eaccelerator.so, 9): no suitable image found. Did find:
/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/eaccelerator.so: mach-o, but wrong architecture in Unknown on line 0
怎么解决?
解决方法:
在eAccelerator源目录下:
make clean
./configure CFLAGS=’-arch i386′ APXSLDFLAGS=’-arch i386′ –enable-eaccelerator=shared –with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
make
sudo make install
Ps:别忘了在/Applications/XAMPP/xamppfiles/etc/php.ini下启用eaccelerator.so扩展
标签:php,osx-lion,xampp,eaccelerator 来源: https://codeday.me/bug/20190704/1378408.html