Eaccelerator cannot be compatible with php5.5.0, fortunately, PHP provides Zend Opcache by default in 5.5.0, So have been accustomed to eaccelerator friends if you want to upgrade to php5.5.0, may be temporarily and Eaccelerator said bye bye.
Configuring Zend Opcache
has always been accustomed to using eaccelerator to provide acceleration for PHP, but there are two problems:
Eaccelerator temporarily incompatible php5.5.0
Eaccelerator and Zend Opcache conflict
Fortunately, the php5.5.0 default provides Zend Opcache for PHP acceleration, the configuration method is as follows:
Zend_extension =/usr/local/webserver/php-d/php-5.5.0/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
; The path above zend_extension path is opcache.so
opcache.memory_consumption=128
Opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
Opcache.revalidate_freq=60
Opcache.fast_shutdown=1
Opcache.enable_cli=1
Note: If the opcache.so instructions are not found in your PHP extension, please reinstall
Http://www.tuicool.com/articles/ZjEJFbj
As you know, PHP currently has three cache plug-ins: APC, Eaccelerator, XCache, but they may all disappear in the future, because PHP 5.5 has integrated Zend Opcache, features similar to the first three but slightly different, Cache speeds are said to be faster than they are (note: It is said that I have not tested it).
php5.5 later version compiled Eaccelerator error is as follows:
Eaccelerator.c:66:23:error:php_logos.h:no such file or directory
The reason is that PHP5.5 the following versions have Php_logos.c,php_logos.h and other files.
If you want to continue using acceleration in the new version, now know that PHP comes with an extension opcache.
The operation is as follows:
1 2 3 4 |
Cd/usr/local/src/php-5.6.0/ext/opcache /usr/local/webserver/php/bin/phpize ./configure--with-php-config=/usr/local/webserver/php/bin/php-config Make && make install |
Best modified/etc/php.ini at the end of the join
1 2 3 4 5 6 7 8 |
[Opcache] Zend_extension=/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20131226/opcache.so opcache.memory_consumption=128 Opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 Opcache.revalidate_freq=60 Opcache.fast_shutdown=1 Opcache.enable_cli=1 |
Restart PHP-FPM:
1 |
KILL-USR2 ' Cat/usr/local/webserver/php/var/run/php-fpm.pid ' |
Test the address in https://gist.github.com/ck-on/4959032, save the above code as a PHP file and put it in the directory below your website to open it to see.
PHP Zend is provided by default in 5.5.0 Opcache