在Debian Squeeze下,我将php 5.3更新到5.4。之后,我尝试安装OPcache,这就是我所做的:
apt-get install build-essential php5-dev unzip
cd /usr/src
wget https://github.com/zend-dev/ZendOptimizerPlus/archive/master.zip
unzip master.zip
cd /usr/src/ZendOptimizerPlus-master
phpize
./configure
make
make test
make install
vi /etc/php5/conf.d/opcache.ini
;zend_extension=/usr/lib/php5/20100525/opcache.so ;PHP 5.4 can't use this, file not exist on my server
zend_extension=/usr/lib/php5/20090626/opcache.so ;PHP 5.3 got only this one (?)
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=8000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
/etc/init.d/apache2 restart
php -v
Zend OPcache requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend OPcache.
PHP 5.4.31-1~dotdeb.0 (cli) (built: Jul 25 2014 18:40:42)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.我做错了什么?"phpize“为我提供了以下内容:
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626对于PHP5.4,这不应该是: 20100525吗?
请帮帮我!
发布于 2014-08-02 02:17:14
您所犯的错误是创建一个默认配置,当然,您应该拥有--enable-opcache,但是您还需要指定一个--with-php-config=.../php-config,其中...表示到5.4php- ./configure的路径。
https://stackoverflow.com/questions/25071445
复制相似问题