I'm programming a page in PHP that fetches rows and shows the contents of a table that belongs to a MySQL-based database.
Sometimes when I request the page, the browser says "The page cannot be displayed", and sometimes (having exactly the same content in the same table, and the same values in all the variables used by the page) the browser shows the results succesfully.
Sometimes after the browser says "The page cannot be displayed", I refresh the page several times until the page is finally served.
¿Could this be a problem of PHP time-out, or settings in the browser preferences, or problems loading all the images the pages uses?
I would appreciate advices and ideas about the subject. Thanks.
"The Page Cannot be Displayed"
Moderator: General Moderators
Might be a currupt browser.
Microsoft Internet Explorer 6, Service Pak 1
Most likley nothing wrong with php itself because the HTML of the page would show if the php didn't work (unless you can't connect to the DB or PHP has a parse error ofcourse).
Microsoft Internet Explorer 6, Service Pak 1
Most likley nothing wrong with php itself because the HTML of the page would show if the php didn't work (unless you can't connect to the DB or PHP has a parse error ofcourse).
page display problems
First of all, you must eliminate anything variable in YOUR program. If the progam works with everything set by you, then there is an issue of the reliability of those variables.
That said, it doesn't sound like that is the problem. Since you should be seeing something other than a page display error.
It sounds to me that it is a server problem. If you can check the error logs of the site, see if you are have resource problems (child processes dying, mysql unable to provide a link, etc.) The other thing is to check the php.ini file to see if you are not displaying errors to the browser. The newer versions of PHP are set to not to by default. If there is an error on the page, and no display is sent to the browser, it is possible this would occur.
Anything else you could tell us? Like the hosting environment, error log information, php.ini settings, etc.
That said, it doesn't sound like that is the problem. Since you should be seeing something other than a page display error.
It sounds to me that it is a server problem. If you can check the error logs of the site, see if you are have resource problems (child processes dying, mysql unable to provide a link, etc.) The other thing is to check the php.ini file to see if you are not displaying errors to the browser. The newer versions of PHP are set to not to by default. If there is an error on the page, and no display is sent to the browser, it is possible this would occur.
Anything else you could tell us? Like the hosting environment, error log information, php.ini settings, etc.