Cheap Hosting Sucks
Came in to work this morning to discover my flash video site had died over the weekend. Well, the web server was still responding, but spitting out blank pages.
My first thought was it must have been some change made last friday that went untested, but no, my local test server was up and running.
What had gone wrong? Well, for some reason my cheap web hosting company (who I shall call PooWeb) had managed to break all Perl and PHP scripts, yet keep everything else running. Being a cheapskate I’d chosen a host in the US, not realising the time difference would cause problems when I needed to call technical support.
So, how to test the basic functions of your web server are working? Create and upload the following files…
html.html
<h1>Yay!</h1>
perl.pl
#!/usr/local/bin/perl
print "Content-type: text/html\n\n<h1>Yay!</h1>";
php.php
<?php echo "<h1>Yay!</h1>"; ?>
Change the first line of the perl file to the location of your perl interpreter, and set the correct file permissions when you upload. (Your host will have told you both settings.)
Now before you test any of the files, rename your “.htaccess” file (if it exists) to “.htaccess-renamed” using your ftp program. Don’t forget to rename it back when you’re done testing.
And that’s it?
Too simple, huh? Well, in these days of £4/month hosting, with 2,000 sites crammed onto the same server, there’s more things to go wrong, and the likelyhood of server configuration problems increases substantially.
With these files it’s easy for you to determine if the problem lies with the server, or your own scripts. They’re also handy to point your technical support guy to when you finally get through on the phone.