Hosting Plans Web Design Resellers Support Contact us Mainswitch Hosting
Home  |  Site Map

  About us

  Contact us

  Apply for Account

  Compare hosting plans

  Customer reviews

  Domain name registration

  Terms of service

Check Domain Availability

 

Register your domain name
for only 16 /year





24/7
Technical Support



  Support

 
CGI/Perl, PHP, and ASP Programming | Back to main FAQ page |

What is CGI-BIN for?
The Perl shebang line
Perl programming paths
 
PHP programming manuals
Test if PHP is working
What is the Perl version?
 



What is CGI-BIN for?

CGI-BIN is the place for executing your cgi/perl scripts on UNIX accounts.


The Perl shebang line

In all Perl scripts, the first line of code should be the shebang line, which in programming terms is the path to Perl on the server. The correct shebang line for Perl scripts reads as follows:

#!/usr/bin/perl




Perl programming paths

The important Perl scripting paths are as follows:

Path to Perl: /usr/bin/perl
Sendmail: /usr/sbin/sendmail
Absolute Path:
For UNIX accounts: /home/sites/www.yourdomain.com/web/
 
Absolute path for CGI-BIN:
For UNIX accounts: /home/sites/www.yourdomain.com/web/cgi-bin
 



What is the Perl version?

Perl v5.22 including MD5 Module



PHP programming manuals

For a complete documentation and a extensive tutorial on the PHP programming language, check out
http://www.php.net/manual. For a quick, mini tutorial check out http://www.php.net/tut.php.



Test if PHP is working (UNIX and Hybrid accounts only)

To test to make sure PHP is working on the server (And to rationalize the reason why your PHP script isn't working is because it's not installed), make a file with a .php extension that has the following contents:

<?
echo phpinfo();
?>


Then place it into a directory where you can view it over web. Acces the page, it will show information about php. If you see the contents of the file, it is not working.




 

Copyright © 2002 Mainswitch Hosting Solution All Rights Reserved.

Terms and Conditions.