Questions tagged [opcache]

OPcache is a PHP opcode cache introduced in PHP 5.5 (and is also available as a PECL extension for PHP 5.2+). It is based on the Zend Optimizer+

The Zend OPcache provides faster PHP execution through opcode caching and optimization. It improves PHP performance by storing precompiled script bytecode in the shared memory. This eliminates the stages of reading code from the disk and compiling it on future access. In addition, it applies a few bytecode optimization patterns that make code execution faster.

Also see the OpCache Readme, the PHP OPcache documentation and the PECL OPcache page.

304 questions
3
votes
0 answers

php caching - Cannot seem to disable opcache in MAMP Pro

This has come up a number of times in other threads, and I've tried every solution that I found with no luck. Running MAMP Pro v6.6.3, and the opcache module is running wild. All my php pages are bing cached seemingly individually, meaning that I…
alexconnor7
  • 119
  • 1
  • 2
  • 9
3
votes
0 answers

PHP OPCache: Cache by script checksum

Is there a feature of OP Cache to cache based on checksum/md5/crc of the php script? Say you install 100 separate instances of WordPress (or similar) running on the same PHP FPM instance. Even if 99% of the scripts in all installs of wordpress are…
peterlh
  • 51
  • 2
3
votes
1 answer

OPcache doesn't cache anything

I have VPS with nginx+php-fpm installed and OpenCart 2 CMS. php 7.3 I have 0 cached scripts and 0 cached keys. OPcache doesn't cache anything, I tried everything but it is still doesn't work My output from phpinfo(): Zend OPcache Opcode Caching Up…
khh
  • 71
  • 7
3
votes
1 answer

Doctrine related entities return all fields values NULL

I am using Symfony 3.1.10 on a server with PHP 5.6.31 (with Zend OPcache 7.0.6-dev), Apache and MySQL (Ver 14.14 Distrib 5.6.37). I have an Entity called Document with a related Entity called Worker The relationship have always worked untill…
Fra Ore
  • 59
  • 2
  • 6
3
votes
1 answer

Does Opcache on PHP7 preallocate all assigned memory?

My opcache had a memory_consumption set of 512M and it was full. So I increased it to 2048M, and restarted the php-fpm daemon. And it immediately filled up again: This site is simply running a WP Multisite installation with 2 subdomain sites.…
raulk
  • 2,809
  • 15
  • 32
3
votes
1 answer

Small changes in code aren't taken into account with OPCache enabled

I've been using APC for Opcode optimization and data storage for few time until I read that OPCache is directly included in PHP since PHP5.5. Thus, I switched to OPCache + APCu. But small changes in code like adding a 'die(var_dump($some_var));' for…
Aleks Ben Maza
  • 327
  • 3
  • 12
3
votes
1 answer

PHP Opcache Replacement Strategy

I understand that APC is being replaced by OpCache. I enabled this module and all is working so far. However, there is very little documentation on how to tune this for best performance. My system currently has a ton of files that need to be cached.…
Tim Hysniu
  • 1,446
  • 13
  • 24
3
votes
1 answer

Cache only specific files with OPCache

I would like to cache only specific files with OPCache... I know I can do that with opcache_compile_file but OPCache keeps caching all other files used by the server. I also know that I can use opcache.blacklist_filename to prevent folder from…
3
votes
1 answer

Laravel PHP5.6 Class not found until opcache enabled

Hi I have a Debian Wheezy VM which i recently upgraded to PHP 5.6 which came with OpCache from 5.4 with OpCache installed separately. Since I have done this all my scripts (Im using Laravel btw) have become cached which I don't want, so I decided to…
user0129e021939232
  • 6,205
  • 24
  • 87
  • 140
3
votes
1 answer

OPcache php5.5 on DirectAdmin disabled

I installed php5.5 to my CentOS DirectAdmin server. I used this http://help.directadmin.com/item.php?id=567 to install OPcache en set it to yes. I did enable OPcache also in my php.ini file with opcache.enable=1. But when I check my phpinfo() it is…
JGeer
  • 1,768
  • 1
  • 31
  • 75
3
votes
1 answer

Codeigniter cache Opcache and APCu

I have to create an exam app that has to load questions that will never change. According to Documentation This will cache the query this->db->cache_on(); $query = $this->db->query("SELECT * FROM mytable"); 1.But this is file driver by default…
zlatek
  • 57
  • 7
3
votes
0 answers

Zend Engine Outdated (how do i update it?)

After installing opcache (after reading it would increase performance), i get the message that Zend Engine API is outdated. But i don't know how to update it? I've looked everywhere, with no success. It's a Centos 6 server, with PHP 5.4.41. Can…
sadlyblue
  • 2,992
  • 7
  • 22
  • 19
3
votes
1 answer

Deploying new PHP code when running Opcache

We are attempting to deploy new PHP code via Capistrano while running Opcache. Capistrano creates a new deploy directory each time you deploy, then adjusts a symlink so that the webserver points to the new directory. Because Opcache caches by the…
Karptonite
  • 1,490
  • 2
  • 14
  • 30
3
votes
1 answer

Disabling opcache.enable in php.ini not working on CentOS

I have a CentOS 7 machine with PHP 5.6 installed on it via Webtatic's php56w repo. I installed the opcache extension with yum install php56w-opcache. Since this is a development machine, I want to turn opcache off by default, so in my /etc/php.ini…
G. Plante
  • 429
  • 1
  • 5
  • 13
3
votes
1 answer

Zend OPcache performance settings vs default settings

As much as I understand those settings: opcache.validate_timestamps=0 opcache.interned_strings_buffer=16 opcache.max_accelerated_files=3907 opcache.blacklist_filename=/blacklisted_files should improve performance (according to links: 1, 2 and 3).…
R.P
  • 500
  • 2
  • 6
  • 17