«
»

PHP syntax error caused 48-hour web site downtime

June 14th, 2011 by George Notaras

Today I realized my web site had been serving an empty HTML document for the last 2 days on every HTTP request no matter what the path was. When I initially noticed the issue, I was a bit worried, but, after taking a closer look at the Apache error log, I found out about a PHP syntax error causing the issue. A couple of days ago I had edited a WordPress plugin on my live web site and, apparently, I made a typo which led to a syntax error and an empty document being served on every request. But, I recall I had checked the website after the modification of the plugin but I hadn’t noticed any issues! Actually, this happened because I had forgot to clear the cache, so when I checked the site after the modification of the plugin, it seemed OK. My modification didn’t change the visual representation of the web site, so, having forgot to turn off caching, there was no way for me to find out about the typo. Lesson learned: never modify the code of a live web site, but, if you have to do it, always turn-off caching before doing so.

The PHP syntax error caused 48-hour web site downtime by George Notaras, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Terms and conditions beyond the scope of this license may be available at www.g-loaded.eu.

Related Articles

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight=""> <pre>