Jump to content

Strange timeout in global PHP variables


Swedie

Recommended Posts

I've been trying to google this but this is probably a pretty unique problem because I can't find anyone else with the same problem.

 

The problem is that PHP sometimes timeout on calls or functions related to looking up global values. For example this: $_SERVER['HTTP_REFERER']. How can it timeout with a blank white page?

It happens several times a day for my users.

 

How can I find out what really is happening behind the timeout?

 

The server is a Windows Server machine with IIS6 but I run Apache on it for PHP and MySQL-pages.

The server has multiple IPs.

 

I have a clue what it could be but I'm far from a technician when it comes to setting up a Windows Server machine.

 

Please help me out! Thank you!

 

Link to comment
https://forums.phpfreaks.com/topic/157789-strange-timeout-in-global-php-variables/
Share on other sites

I don't think that a timeout is your issue. There is no such thing that is why you cannot find any information. If you get a blank page then the script must be terminating with an error but you haven't set your php configuration to display errors.  Add these lines to the top of the script preferably in a common include to all pages:

 

ini_set('display_errors', 1); 
ini_set('error_reporting', E_ALL & ~E_NOTICE); 

It is a timeout error as the page goes blank and display sa "timeout on row 5 of index.php" and on that very code $var = $_SERVER['HTTP_REFERER'].

 

I'm not a total beginner in PHP so I've ruled out quite a bit. I think this issue caused by something rare... I believe it has to do with the fact that the server has multiple IPs and DNS-lookup / reverse DNS stuff. Oh and also the fact that it's a Microsoft machine  :P

 

I don't think that a timeout is your issue. There is no such thing that is why you cannot find any information. If you get a blank page then the script must be terminating with an error but you haven't set your php configuration to display errors.  Add these lines to the top of the script preferably in a common include to all pages:

 

ini_set('display_errors', 1); 
ini_set('error_reporting', E_ALL & ~E_NOTICE); 

 

sdfsddfs

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.