Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.