One on One Internet - It's Your Life...It's Your Business...We're One on One Internet
Support
 
questions?
Call us toll-free

 

Referral Rewards
One on One Internet gave me all the help I needed to set up a site for my real estate brokerage. I didn’t know it could be this easy!

 

/ support / support center / cgi

 

CGI


Running CGI and Perl Scripts

You have a folder in your account called 'cgi-bin'. It is underneath the '<domain>-www' folder. This is the location for your CGI and Perl scripts. In general, there are a few things that need to be done for your scripts to run properly:

You need the correct location of the Perl executable in your script. See path information below

You need to upload the scripts in ASCII mode to the gi-bin folder.


How do I set file permissions for a CGI script?


All CGI scripts must be set with the executable file permission. Failure to do so will result in an Internal Server error. CGI scripts are any files that end in .cgi or .pl

To set a script to be executable, in SSH type: chmod 755 *.pl *.cgi. This will change the file permissions to read, write, and execute.


Path Information


Here are some paths you may require in using your scripts:

Sendmail: /usr/sbin/sendmail
Perl: #!/usr//bin/perl
Serverpath: /home/username/domain-www/cgi-bin
Root path: /home/username/ (puts you in your the root of your account)
Domain directory: /home/username/domainname-www (puts you in your www directory)
Cgi-bin path: /home/username/domainname-www/cgi-bin/filename (puts you in your cgi-bin)

NOTE: "domainname" means your domain name without the .com at the end or 'www' in front.


How do I call a script securely?


Make your cgi bin path as follows: https://secure_server_name.com/your_domain_name/cgi-bin/scriptname.cgi

secure_server_name.com is the name of the server your domain is hosted on. To access a script called auction.pl securely, do the following:

1. FTP the script auction.pl to your /cgi-bin directory.

2. Call the script as follows:

https://secure_server_name.com/your_domain_name/cgi-bin/auction.pl


Troubleshooting CGI and Perl Scripts


Many times a "500 - Internal Server Error" is generated when a script is improperly set up. Before contacting Support, use this checklist to see what might be causing the problem:

  • Did you upload the scripts as ASCII format versus Binary?
  • Did you upload the scripts into the /cgi-bin/ folder?
  • Did you set permissions for the script to 755?
  • Did you specify the proper locations of Perl and Sendmail?
  • If you are running the script through SSL secure server, did you request that we enable that feature for you?
  • Does the file have the correct extension? (.cgi, .pl)
  • Linux is case-sensitive. Did you make sure to link to files using the *exact* spelling, including case?

 


solutions sign up support resellers about us
© 2007, Hosting Ventures, LLC. , All Rights Reserved.