让Zend Optimizer和eAccelerator完美并存为Magento再加速

1,933 人次阅读
没有评论

共计 1234 个字符,预计需要花费 4 分钟才能阅读完成。

用php -v查看得到以下错误信息:
PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.0 is incompatible with eAccelerator 0.9.5.2 in Unknown on line

在CentOS5.2下的解决方法
(继续)

为:
mv /etc/php.d/eaccelerator.ini /etc/php.d/eaccelerator.ini save
然后,再把以下内容添加到/etc/php.ini中的[Zend]上方:

[eAccelerator]
; Enable eAccelerator extension module
zend_extension = /usr/lib/php/modules/eaccelerator.so
; Options for the eAccelerator module
eaccelerator.cache_dir = /var/cache/php-eaccelerator
eaccelerator.shm_size = 0
eaccelerator.enable = 1
eaccelerator.optimizer = 1
eaccelerator.check_mtime = 1
eaccelerator.filter = “”
eaccelerator.shm_max = 0
eaccelerator.shm_ttl = 3600
eaccelerator.shm_prune_period = 0
eaccelerator.shm_only = 0
eaccelerator.compress = 1
eaccelerator.compress_level = 9
eaccelerator.keys = “shm_and_disk”
eaccelerator.sessions = “shm_and_disk”
eaccelerator.content = “shm_and_disk”
eaccelerator.debug = 0

现在重启apache,
service httpd restart
用php -v 查看会看到如下内容:

[root@phpfree etc]# php -v
PHP 5.1.6 (cli) (built: Apr 7 2009 08:00:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

这表明Zend和eAccelerator已经正常运行了。

正文完
 0