I have such a problem with one site, I go to the site and start clicking on the links - sometimes the page is displayed normally, and sometimes just a white page opens (empty), if you press Ctrl + U to see the HTML code, then it’s just empty. And sometimes you have to press F5 several times to display the page. I look at the Apache server logs - but it's empty, this error is not displayed in the logs. And the server where the site is very powerful (Top percent Core i7 + 32GB RAM DDR3 2400Mhz) What should I do? How to get rid of such a glitch?
UPD: Error reporting is enabled in the php.ini file. But what is most interesting is that even when the server issues a blank page, the HTTP server response is this:
Request URL: http://travianx5.ru/dorf2.php Request Method:GET Status Code:200 OK Request Headersview source Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding:gzip,deflate,sdch Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Connection:keep-alive Cookie:t3l=1; PHPSESSID=66m7fqbmi75kvaadtm2v8mhn17; COOKUSR=spoilt Host:travianx5.ru Referer: http://travianx5.ru/spieler.php?uid=6 User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36 Response Headersview source Connection:Keep-Alive Content-Length:0 Content-Type:text/html Date:Wed, 29 Jan 2014 14:14:37 GMT Keep-Alive:timeout=5, max=100 Server:Apache/2.4.6 (Ubuntu) X-Powered-By:PHP/5.5.3-1ubuntu2.1
That is, the type is all OK, but how can this be? There is silence in the logs too, there is no 500th error, only Warning'i ...
Here is the Apache server error log for today's date:
PHP Warning: include(): Failed opening '22_0.tpl' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/Templates/Build/22.tpl on line 9, referer: http://travianx5.ru/dorf2.php [Wed Jan 29 04:16:34.137593 2014] [:error] [pid 3276] [client 192.168.1.1:54750] PHP Warning: unlink(GameEngine/Prevention/market.txt): No such file or directory in /var/www/GameEngine/Automation.php on line 991, referer: http://travianx5.ru/dorf2.php [Wed Jan 29 09:28:04.700181 2014] [:error] [pid 4225] [client 188.235.65.219:53207] PHP Warning: unlink(GameEngine/Prevention/cleardeleting.txt): No such file or directory in /var/www/GameEngine/Automation.php on line 457, referer: http://travianx5.ru/dorf1.php [Wed Jan 29 11:38:05.420588 2014] [core:error] [pid 4500] [client 86.57.255.92:20043] AH00126: Invalid URI in request \xa3{(i\xc0\xb2hy\xa4\x84\xba\bq/\b7\x0c\xfcV\xbe
Here is the file .htaccess, which lies in the root of the site:
<Files "*.tpl"> Order Deny,Allow Deny from all </Files>
Most likely, yes, everything goes through this file:
if(isset($_POST)){ if(!isset($_POST['ft'])){ $_POST = @array_map(array($database->connection, 'real_escape_string'), $_POST); $_POST = array_map('htmlspecialchars', $_POST); } } $rsargs=$_GET['rsargs']; $_GET = array_map(array($database->connection, 'real_escape_string'), $_GET); $_GET = array_map('htmlspecialchars', $_GET); $_GET['rsargs']=$rsargs; $_COOKIE = array_map(array($database->connection, 'real_escape_string'), $_COOKIE); $_COOKIE = array_map('htmlspecialchars', $_COOKIE); ?>