While most hosting servers will have the necessary provisions to ensure that modern scripts can be executed without issue, every once in a while I come across a client who has a hosting account that doesn’t have the basics needed to process dynamic scripts.
In some cases a client will choose hosting that is provided for free by the ISP, or is someone’s own hosting server (both which I would avoid). What I mean by dynamic here is the hosting server’s ability to process PHP or ASP scripts (which commonly interact with a database). This is important since almost every script out there that processes data uses PHP (Unix/Linux) or ASP (Microsoft Servers). Our preference is PHP, but I will leave that for another post.
When you get hosting you define early on the type of server you want (Unix/Linux or Microsoft) and in most cases the server will be ready to run most any script out there. I say “most any” since there are always a few scripts that won’t work (most notably Ioncube Zend Framework) which is typically only provided on a dedicated hosting platform.
If you suspect, or have been told, that your server can’t process scripts then you can contact your hosting company (which many clients find difficult do to poor customer service), or create a simple script and test for PHP and ASP yourself. Assuming you’ve chosen the latter option, this is what is needed.
To start things off, I would test for PHP. In many cases even ASP servers will provide support for PHP, and the majority of quality scripts available are written in PHP so this is the “ideal” option anyway. Following is a simple test script that will check and display some of the host’s PHP specifications. Type this in, save it as info.php and upload it to your server area.
1. Open up notepad. Programs >> Accessories >> Notepad). Once open copy and paste the following: (starting with the opening <html> tag, and the closing </html> tag.
<html>
<head>
<title> PHP Test Script </title>
</head>
<body>
<?php
phpinfo( );
?>
</body>
</html>
2. Save the document as info.php (select: File –> Save As –> (copy/paste file name) and under “save as type” select “all files”. The “all files” is important since you want it to work on the web, whereas the .txt (text document) extension won’t display as a web page.
3. Afterwards, FTP the file up to your server, open your browser and type in the address to view that page. Something like… http://www.yourdomain.com/info.php
Note: on a side note, notepad is used by many designers to strip away unnecessary markup when providing text copy to a web page. MS Word, email accounts, and other processors use their own embedded styling, which in most cases will carry over to an html document, for this reason the simple act of copying the text from Word, and pasting to Notepad can save one a lot of headaches.
If the PHP Test failed, the next option is to do an ASP Test. This works the same way as noted previously, but in this case you will save it as info.asp.
<%@ Language="VBScript" %>
<% Option Explicit %>
<html>
<head>
<title> ASP Test Script </title>
</head>
<body>
<% Dim TestString %>
<% TestString = "ASP is Working!" %>
<h1>
<% Response.Write TestString %>
</h1>
</body>
</html>
Assuming you have ASP installed then the text should read “ASP is Working!”. If not, well, contact your hosting server and find out why neither PHP or ASP is installed? But my suggestion, get with a “real” hosting company since life is too short to accept hosting with limitations.