As we all know, there are generally three PHP caching plug-ins: APC, eAccelerator, and XCache, but they may all disappear in the future, because PHP 5.5 has integrated Zend Opcache, and its functions are similar to the first three but slightly different. The caching speed is said to be faster than them (note: it is just said, I have not tested it).
The error when compiling eAccelerator with php5.5 or later versions is as follows:
<ol class="dp-j"><li class="alt"><span><span>cd /usr/local/src/php-</span><span class="number">5.6</span><span>.</span><span class="number">0</span><span>/ext/opcache </span></span></li><li><span> </span></li><li class="alt"><span>/usr/local/webserver/php/bin/phpize </span></li><li><span> </span></li><li class="alt"><span>./configure --with-php-config=/usr/local/webserver/php/bin/php-config </span></li><li><span> </span></li><li class="alt"><span>make && make install </span></li></ol>
It is best to modify /etc/php.ini and add at the end:
<ol class="dp-j"><li class="alt"><span><span>opcache] </span></span></li><li><span> </span></li><li class="alt"><span>zend_extension=/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-<span class="number">20131226</span><span>/opcache.so </span></span></li><li><span> </span></li><li class="alt"><span>opcache.memory_consumption=<span class="number">128</span><span> </span></span></li><li><span> </span></li><li class="alt"><span>opcache.interned_strings_buffer=<span class="number">8</span><span> </span></span></li><li><span> </span></li><li class="alt"><span>opcache.max_accelerated_files=<span class="number">4000</span><span> </span></span></li><li><span> </span></li><li class="alt"><span>opcache.revalidate_freq=<span class="number">60</span><span> </span></span></li><li><span> </span></li><li class="alt"><span>opcache.fast_shutdown=<span class="number">1</span><span> </span></span></li><li><span> </span></li><li class="alt"><span>opcache.enable_cli=<span class="number">1</span><span> </span></span></li></ol>重启php-fpm:<br />究其原因是PHP5.5以下版本有php_logos.c,php_logos.h等文件。
If you want to continue using acceleration in the new version, we currently know that PHP comes with the extension opcache.
<ol class="dp-j"><li class="alt"><span><span>1kill -USR2 `cat /usr/local/webserver/php/var/run/php-fpm.pid` </span></span></li></ol>
The test address is https://gist.github.com/ck-on/4959032. Save the above code as a php file and open it in your website directory to see it.