database test

Posts Tagged database test

PHP header 500 – manage your mySQL errors

Tuesday, August 21st, 2007 in MySQL, PHP | 1 comment

From time to time problems appear. mySQL server crashes, some error in a sql query might think it’s time to show her ugly face and in top of all that, the all mighty Google comes to index your page. And when he does, he indexes a page that presents an error or a blank page. How can we stop him from indexing that page? With a header 500 error.

The header 500 error or “Internal Server Error” means that the server has a nasty indigestion and the search engine should come back later to see the page in all it’s splendor. And that’s exactly what it will do. So, how do we trigger that error?

Most scripts use the mysql_query(“some sql”)or die(mysql_error()) sintax. Well, that’s ok because in case of an error, the script stops and the error appears so the debug process can begin. The only problem is that if some error appears, it will be indexed by search engines. (more…)

Tags: , , ,