Bug #70197 [Com]: Changing php file will give blank page

From: Date: Wed, 26 Aug 2015 19:53:09 +0000
Subject: Bug #70197 [Com]: Changing php file will give blank page
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195540@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70197&edit=1 ID: 70197 Comment by: mihor dot cz at gmail dot com Reported by: venancio1981 at gmail dot com Summary: Changing php file will give blank page Status: Open Type: Bug Package: opcache Operating System: Centos 6.6 PHP Version: 7.0.0beta2 Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2015-08-22 10:32:32] venancio1981 at gmail dot com The bug still happens with the last PHP 7 RC1. Regards ------------------------------------------------------------------------ [2015-08-11 13:53:40] venancio1981 at gmail dot com Hello, 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. Best Regards ------------------------------------------------------------------------ [2015-08-11 03:15:42] laruence@php.net hmm, by changing a php file, did you use cp or mv? it's recommended always use mv to update the file. ------------------------------------------------------------------------ [2015-08-06 09:01:08] venancio1981 at gmail dot com 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. ------------------------------------------------------------------------ [2015-08-06 02:48:05] laruence@php.net is there anything outputted in error log? and please also check your opcache.file_update_protection configuration ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=70197 -- Edit this bug report at https://bugs.php.net/bug.php?id=70197&edit=1

« previous php.bugs (#195540) next »