I've installed latest XAMPP server with PHP 7 (update: checked also PHP 7.1) (on my Windows 10 system). Wanted to use opcache, so I enabled it in php.ini
.
[opcache]
zend_extension=php_opcache.dll
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
With that change now, and with almost every page refresh, I'm getting this error from Apache:
AH00428: Parent: child process 3748 exited with status 3221226356 -- Restarting.
So, page is loading, and loading... waiting to Apache start again. When I'm turning opcache off (by setting opcache.enable=0
), Apache is not restarting and everything works fine (omitting the slower web application topic, of course).
Everything works fine while loading app on XAMPP having PHP 5.6 with enabled opcache
.
EDIT (added GIF image):
As you can see, sometimes page refreshes like it should. But sometimes it's refreshing much longer, and Apache is restarting in that moment.
EDIT:
To be honest, I gave up with this application and working with PHP on Windows (was working on it for around 10 years with PHP <= 5.6). It's very hard/impossible (for now) to make PHP 7.x work on that OS (with Opcache). Decided to go with Ubuntu and server created with Docker. Everything is easier to configure (especially with Docker) and works faster. I advise everyone to do the same ;).
Your php_opcache.dll
path seems wrong, you need write it like below, it works for me.
[opcache]
zend_extension=C:\xampp\php\ext\php_opcache.dll
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=256
opcache.max_accelerated_files=2000
If your XAMPP comes with PHP 5.5+ by default, opcache already included in the bundle, you will just need to enable it. To enable the extension:
Open php.ini (by default it should be located here: C:\xampp\php\php.ini).
Add this line at the end of the file:
zend_extension=C:\xampp\php\ext\php_opcache.dll