go to bug id or search bugs for
Im testing Invision Power Suit 4 with PHP 7.0.0 Beta 2 and i noticed that everytime i change a php file, my site will return a blank page, till i restart the httpd service.
I suspected this was something related with the Zend Opcache, so i disable it and this did not happen again, so its something with the Opcache.
I cannot replicate this with PHP 5.6 and Zend Opcache 7.0.5.
Add a Patch
Add a Pull Request
is there anything outputted in error log?
and please also check your opcache.file_update_protection configuration
Nothing appears on the error logs. I might add that i don't need to actually change the code of the php file, i only need to change the timestamp of it to replicate the problem.
The opcache.file_update_protection is set to the default 2 seconds.
I have some more things to add:
- When i replicate the bug, if i reset the cache of the Zend Opcache, it will still not resolve the issue. For now, i found that only restarting the httpd service can fix it.
- Only the site that uses that php file will have the issue. Other php files still works. Its like that file got corrupted in the opcache, so my site can't access it and returns a blank page.
- If i set opcache.validate_timestamps to false, i can't replicate the issue. Which is normal, because the Opcache will not verify the timestamp to recache the file if it changed. But if i reset the cache after changing the timestamp of the php file, i will get the issue again.
hmm, by changing a php file, did you use cp or mv? it's recommended always use mv to update the file.
The way i updated the php files, was with ftp using the protocol SFTP. I just copied the updated PHP files overwriting the old ones.
I can also replicate the issue, if with SFTP i edit a PHP file and save it.
The bug still happens with the last PHP 7 RC1.
Hello PHP team!
I experienced this bug(?) too!
I just repeatedly experienced (on my demand - with testing) that it's caused by opcache with combination of chaning php files (in my case with `# svn up` command)
Scenario 1: (disabled opcache) - tested multiple times
upping PHP code with svn (up and down to specific revision)
Everything is working fine every time.
Scenario 2: (enabled opcache) - tested multiple times
upping PHP code with svn (up and down to specific revision) or chaning it via Sublime+ExpanDrive connected to Linux server via SSH
I repeatedly uninstalled opcache and tested (scenario 1) and then installed opcache and tested (scenario 2) and then again uninstalled, installed etc etc and every time same result.
Error is like this:
Fatal error: Class 'MyClass' not found in /var/www/html/project/classes/MyClassExtension.php on line 8
System: CentOS 6
PHP version: 7.0.0RC1
*changing php files (not chaning php files - sorry for that typo)
I forgot to mention three things:
1) Scenario 2 always! caused fatal error
2) Same as venancio1981 - after fatal error I have to restart apache service to solve the problem (temporarily till next change)
3) Same as venancio1981 - PHP 5.6.12 with opcache enabled is working fine
It seems like it's fixed in PHP 7 RC2.
Can somebody please check it as well?
Yes, it seems fixed in RC2
Im having this bug again in RC4.
There was some kind of regression?
I'm also seeing this on RC4.
But I do not need to edit a file to get the blank page on Invision Power Suit 4, All I need to do is enable opcache then refresh the page a couple times and I get a blank page no error's nothing in the logs. once I have the blank page after a couple more refreshes it comes back but then goes blank again after more refreshes of the page.