Page 1 of 1

[solved] XAMPP 7.0.8 opcache can't be enabled

PostPosted: 18. August 2016 23:09
by ollo
Hi there,

I recently switched to the above mentioned version of XAMPP and wanted to play around with opcache. Then i noticed it's not enbled although it should be an internal extension and enabled by default in PHP7 as far as I know. The opcache_get_status() is an undfined function, ini_get('opcache.enable') gives FALSE and there also isn't any section on opcache in phpinfo() which I would expect.

I tried to force-enable it via php.ini, no luck. I then noticed there is a php_opcache.dll which I tried to load via php.ini, no luck. I also don't see any opcache-related entries in the apache error log.

Is there a known problem with this XAMPP/PHP version and opcache that prevents it from starting? Was there an error in the building process so it isn't linked or sth? I'm out of my wits and the internet sources only give irrelevant stuff, so any help would be appreciated.


...just after posting I found a user comment in the PHP documentation I overlooked somhow, the solution is to add the following line to the php.ini which was missing from the distributed php.ini:

I only tried extension=php_opcache.dll before, so that's why it didn't work before - I would suggest that this is checked and fixed in future versions of XAMPP if the original distribution has this line missing.