opcache

OpCache with Symfony

ε祈祈猫儿з 提交于 2021-02-08 17:14:58
问题 I know you can use with Symfony APC or XCache Class Loader. Unfortunately, in the shared server where I put my Symfony code, there is only OpCache with is activated. Can I use Symfony with OpCache ? If yes, how and what is the code to put in my app.php please ? If not, why please ? 回答1: You don't have to do anything in Symfony to enable opcache. You only need to make sure it's enabled in your PHP configuration ( opcache_enable option). Forget APC/XCache class loaders. APC/XCache class loaders

is my OpCache running?

半腔热情 提交于 2020-08-21 01:58:07
问题 I am trying to enable opCache on my server ( ubuntu 12.04 LTS , running apache 2.4.7 with PHP Version 5.5.10-1+deb.sury.org~precise+1 ). Before starting to do anything, I read this highly relevant post which told me that opCache is disabled by default and I have to manually enable it. I went into php.ini and found that there is no text with opcache.so , also everything related to opcache is commented out. Like this: [opcache] ; Determines if Zend OPCache is enabled ;opcache.enable=0 ;

is my OpCache running?

被刻印的时光 ゝ 提交于 2020-08-21 01:57:12
问题 I am trying to enable opCache on my server ( ubuntu 12.04 LTS , running apache 2.4.7 with PHP Version 5.5.10-1+deb.sury.org~precise+1 ). Before starting to do anything, I read this highly relevant post which told me that opCache is disabled by default and I have to manually enable it. I went into php.ini and found that there is no text with opcache.so , also everything related to opcache is commented out. Like this: [opcache] ; Determines if Zend OPCache is enabled ;opcache.enable=0 ;

Blacklist a directory with Zend Opcache

拜拜、爱过 提交于 2020-01-22 17:47:06
问题 How can i tell Zend Opcache not to cache any files from a specific directory. For e.g /var/www/public_html/devzone/* I use PHP 5.5.13 with Zend OPcache v7.0.4-dev 回答1: You should set the opcache.blacklist_filename configuration value with a file path to your blacklist. The location of the OPcache blacklist file. A blacklist file is a text file containing the names of files that should not be accelerated, one per line. Wildcards are allowed, and prefixes can also be provided. Lines starting

Doctrine is freaking out when I turn on php opcache on

最后都变了- 提交于 2020-01-14 22:51:49
问题 I'm having a really strange problem with Doctrine and PHP 5.5.6 Opcache . Everything is working just fine when the opcache module is turned off. Once I turn it on, I begin getting the following exception: Fatal error: Uncaught exception 'Doctrine\ORM\Mapping\MappingException' with message 'Class "Admin\Models\Users\Role" is not a valid entity or mapped super class.' in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php on line 336 ( ! ) Doctrine\ORM\Mapping\MappingException:

caching static data in PHP with opcache

佐手、 提交于 2020-01-05 05:26:48
问题 I have ~100 string variables that need to be available on every webpage of a PHP site. The data will never change at runtime, though in the future I will need multiple sets of the data and to switch between the one in use for a page request. The length of the strings vary from 5 to 600 characters. I'm currently including a file that has the data like this: $someStuff = "abc"; $otherStuff = "def"; // etc I am using opcache. How much will this approach benefit from opcache? I've seen this

Zend OPCache - opcache.enable_cli 1 or 0? What does it do?

▼魔方 西西 提交于 2019-12-30 01:37:48
问题 In the documentation it says "mostly used for debugging" which would lead me think "never enable it unless you've a problem and need to do some debugging," however reading mostly everything that I could find about it says to enable it "opcache.enable_cli 1" but why? I could not find any information concerning this matter, so if anybody knows, why should I enable it if the documentation basically says to keep it on 0? 回答1: Leave it off. It's primarily there for use while debugging issues with

Local variables not shown when OPcache is enabled while debugging with Xdebug

会有一股神秘感。 提交于 2019-12-24 09:13:16
问题 I have Xdebug enabled and working together with OPcache. OPcache module is loaded first by phpfpm (important). If you try to debug the code below (from the browser) and put a breakpoing in the local variables you will see that they are not displayed. If I deactivate OPCache everything works as expected. I'm using PhpStorm 2018.2.5 to debug. class Foo { public $member = 'Some value'; public function methodFoo() { $localFoo = "local2"; } } class Bar { public $firstMember = "foo"; public

APC -> APCu / OPCache, performance poor

喜夏-厌秋 提交于 2019-12-18 10:24:12
问题 I have an m3.xlarge EC2 instance that I updated to PHP 5.5.11 today. With this update, it overwrote php55-pecl-apc with php55-pecl-apcu . After reading and experimenting, my understanding is that APC has been replaced with OPCache , except for a key value store which can be brought back with APCu . After tweaking my config to something that looks reasonable, using Wordpress while logged in is now terribly slow, at least 300-900ms worse (the front end is cached via varnish, and works perfect..

php opcache variables not set correctly

岁酱吖の 提交于 2019-12-13 07:36:29
问题 I'm trying to set the variables to setup opcahe in my php.ini file. phpinfo says: Configuration File (php.ini) Path /etc/php/7.0/fpm Loaded Configuration File /etc/php/7.0/fpm/php.ini Scan this dir for additional .ini files /etc/php/7.0/fpm/conf.d Additional .ini files parsed /etc/php/7.0/fpm/conf.d/10-mysqlnd.ini, /etc/php/7.0/fpm/conf.d/10-opcache.ini, /etc/php/7.0/fpm/conf.d/10-pdo.ini, /etc/php/7.0/fpm/conf.d/15-xml.ini, ... And /etc/php/7.0/fpm/conf.d/10-opcache.ini, contains: zend