woff 發表於 2015-3-16 23:13:40

配置PHP識別加速器Zend Guard Loader報錯

配置PHP識別加速器Zend Guard Loader

錯誤1

Failed loading /usr/local/php5/lib/php/ZendGuardLoader.so: /usr/local/php5/lib/php/ZendGuardLoader.so: wrong ELF class: ELFCLASS32

以上錯誤的原因是64位系統用了32位的ZendGuardLoader.so
解決辦法就是去下載一個對應PHP版本的64位ZendGuardLoader.so文件


1、下載Zend Guard

32位http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz

64位http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

mkdir /usr/local/zend

tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz

sudo cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php5.3.x/ZendGuardLoader.so /usr/local/zend/

2、配置
vim /etc/php.ini

最後加上:
zend_extension=/usr/local/zend/ZendGuardLoader.so

################################################## ######################################

錯誤2

./php-fpm start
ALERT: pm.min_spare_servers(5) and pm.max_spare_servers(35) cannot be greater than pm.max_children(5)

cat cat php-fpm.conf


pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice


listen = /tmp/ php-cgi.sock
user = www
group = www
pm = dynamic
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 100
pm.max_spare_servers = 60
request_terminate_timeout = 100

錯誤原因,按照這個原則去配置

min_spare_servers ≤ start_servers ≤ max_spare_servers ≤ max_children
頁: [1]
查看完整版本: 配置PHP識別加速器Zend Guard Loader報錯