OPCache causing Apache to Crash
-
Hello Everyone!
I'm attempting to set up opcache. It seems to work fine until I access the site locally. Let me explain.
My current setup consists of a windows machine running laragon using apache. I enabled the opcache extension for php. My friend accesses my wordpress website using a DDNS address setup by my Asus router and everything is fine. No matter what he does, it works.
To avoid having to setup wordpress to work with multiple domains, I use the same DDNS address. However, I am accessing the site on the same network that the windows machine that is running Laragon is on as well. Doing this causes apache to crash only when opcache is enabled.
I know there is a way to configure opcache and maybe that's what I need to do? Or maybe I just need to clear the cache. I tried doing some research and couldn't seem to find anything.
-
@MightyRufo :
Can you test with PHP 7.1.11 Non Thread Safe (nts):
http://windows.php.net/downloads/releases/php-7.1.11-nts-Win32-VC14-x64.zip
-
Using PHP 7.1.11 gives me an internal server error.
NothingWordpress will not load with or without opcache enabled. I suspect this is an issue with a plugin I've installed. We'll see what I can come up with.
-
If you xdebug, you have to enable it after opcache (https://ayesh.me/xdebug-php-72-windows#troubleshoot)
-
If you are running xdebug, then you will have to enable PHP opcache. For this you will have to add this to your php.ini file.
opcache.memory_consumption=128 (for caching all compiled files)
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000 (by default can cache 2000 files)
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
The last command will enable Opcache, while the above commands are its default configuration.