Hostgator Getting Started, Troubleshoot or Setup CGI

October 9th, 2011 by Regaz

To setup Correctly and Getting Started with the CGI process in Hostgator is quite Tricky
If you don’t know Exactly How to Setup all the Details.

Hostgator CGI, Hostgator Hostgator, CGI CGI CGI, CGI Perl Scripts,
CGI Setup, CGI Tutorial, CGI Python, Hostgator Hosting, Hosting Hosting
  1. Perl and Python CGI Scripts must reside in the cgi-bin directory
  2. You must use the .pl and .py Extension, .cgi extension doesn’t works out of the box
  3. You must give Exactly a 755 Permission, 775… Don’t work
  4. Your Perl‘s testing script must contains an Header
  5. Is the same to use as path either /usr/bin or /usr/local/bin
  6. Make this Latest Test:

  7. Make this Prerequisite Test:

     

    After if You Did Not Get Any Warning from this Latest Test You Can Follow with CGI Setup!

After you Take into Consideration All the previous Details here below are the testing scripts…

For Perl upload in your cgi-bin directory as test.pl this script:

#!/usr/bin/perl -w
print "Content-type: text/htmlnn";
print "";
print "";
print "";
print "


Test page using Perl


";
print "";

To test your working CGI script open in your browser:
http://yourHostgatorDomain/cgi-bin/test.pl

For Python Upload in your cgi-bin directory as test.py this script:

#!/usr/bin/python
print "Content-type: text/htmlnn";
print "";
print "";
print "";
print "Test page using Python
";
print "";

To test your working CGI script open in your browser:
http://yourHostgatorDomain/cgi-bin/test.py

(Visited 19 times, 1 visits today)

Tags: , , ,