Page 1 of 1
Error 404 instead of a php error message
Posted: Fri Jun 09, 2006 7:47 am
by mahmood
Hi
Recently I got error 404 "page not found" instead of a php error messages. setting error_reporting to different options wouldn't help as well.
Why is this?
Posted: Fri Jun 09, 2006 10:41 am
by RobertGonzalez
You need to give a little more information. First of all, the page you are loading, does it exist on the server? Is it named exactly the way you are calling it? Did it work before? Answer some of these questions and let's see if we can help you.
Posted: Sun Jun 11, 2006 12:12 pm
by mahmood
[quote="Everah"]You need to give a little more information. First of all, the page you are loading, does it exist on the server? Is it named exactly the way you are calling it? Did it work before? Answer some of these questions and let's see if we can help you.[/quote]
Does this mean that it is impossible?
I am certain that it happens. for example if I have $result5 = mysql_query($sql5) OR die(mysql_error()); and there is no connection to the database, then I get page 404 error instead of relative error message.
Or another example that I just saw, I renamed $result5 to $result but I didn't rename it here: $name = mysql_result($result5,0,"Name"); and I again I got error 404, I correct it and everything is OK.
Again anothe example I delete a line but "$" remaind, the same error. Something like this: $name = stripslashes($name);, I deleted the line except "$".
Posted: Sun Jun 11, 2006 11:53 pm
by RobertGonzalez
Check the name of the file and make sure you are using the right case. 404 errors are thrown by the server because it cannot the file named by the URL reference. Apache is a case sensitive server, so a file name myFile.php is not the same file as myfile.php. If you are still getting the 404 page after changing your page code it is because the file cannot be found, not because of the code on the page.