I've attached a screenshot. Any ideas of what I'm missing? I've enabled it via php.ini
, it shows in phpinfo
as enabled
, but says opcode caching is disabled
. Using PHP 5.5.
Asked
Active
Viewed 3,112 times
2

HaveNoDisplayName
- 8,291
- 106
- 37
- 47

DxMonkey
- 31
- 1
- 4
-
Have you checked the opcache error log as identified in that screenshot? The answer may lie in there. – Doug McLean Dec 04 '15 at 14:17
-
I have, and it's empty unfortunately. – DxMonkey Dec 04 '15 at 14:19
-
1Is this on a Windows platform by any chance? From http://php.net/manual/en/opcache.configuration.php: "When running PHP on Windows, you need to be running the Webservice (Apache or IIS) as a local administrator in order to allow PHP to create a shared memory segment. If you run your webservice as anything else, OPCache will simply be disabled." – Doug McLean Dec 04 '15 at 14:24
-
It's on Ubuntu 14.04. – DxMonkey Dec 04 '15 at 14:27
-
Have you restarted the web server? – Matt Gibson Dec 06 '15 at 15:04
1 Answers
1
I've found the answer to this on my own, but I want others to know as well if they run into the issue.
For whatever reason, multiple .ini files were generated for opcache on the server box and they contained the same settings.
I deleted one, re-enabled opcache, and now it's working perfectly.

DxMonkey
- 31
- 1
- 4
-
Yup, I found `/etc/php.d/10_opcache.ini` which was overriding the `php.ini` – Omi Harjani Jun 05 '23 at 09:37