Support > CGI
General Questions
Where are sendmail, perl, and date located?
What version of perl does de Optic HOSTING support?
What is my "real" or "absolute" path?
What file extensions can I use for CGI scripts?
Where can I find pre-made CGI scripts?
How do I use Server Side Includes?
What does a "500 Internal Server" error mean?
Where are sendmail, perl, and date located?
Some CGI scripts require you to supply them with the system path
to certain system binaries. Here are the 3 most common:
sendmail - /usr/sbin/sendmail
perl - /usr/bin/perl
date - /bin/date
What version of perl does de Optic HOSTING
support?
de Optic HOSTING supports Perl version 5.6.1.
What is my "real" or "absolute" path?
Your real, or absolute path will be the same on all the Unix servers,
it is /home/username/public_html/ . So if you have a file in a
cgi-bin you would have your absolute path be /home/username/public_html/cgi-bin/file.ext.
What file extensions can I use for CGI scripts?
When you use CGI scripts, you need to give them either a .cgi or a .pl extension.
Otherwise, the web server will not recognize them as CGI scripts and will
display them as a text file or html document.
Where can I find pre-made CGI scripts?
de Optic HOSTING recommends the following sites for finding pre-made
CGI scripts:
http://hotscripts.com
http://www.cgi-resources.com
http://www.scriptarchive.com/
How do I use Server Side Includes?
de Optic HOSTING supports server side includes. The syntax for
a Server Side Include looks like this:
<!--#<tag> <variable>-->
For example, to show the current date, insert this line into your HTML code
where you want the date to be displayed:
<!--#echo var="DATE_LOCAL"-->
For more information on using server side includes, please visit the following
URLs
http://www.apacheweek.com/features/ssi
http://hoohoo.ncsa.uiuc.edu/docs-1.5/tutorials/includes.html
What does a "500 Internal Server" error mean?
This error means that there is a problem with your CGI script.
Please see our CGI debugging section for information on how to
fix this. There are only 5 things that can cause the cgi files
to return an internal server error:
1) The permissions are set to something other than 755 (the directories that
lead up to and contain these files also must be set to 755)
2) The paths defined in the scripts aren't set to our server's settings. the
path to perl is /usr/bin/perl so you would define it like this:
#!/usr/bin/perl
3) The syntax of the script is not correct.
4) The CGI file was uploaded in binary format, when it should have been uploaded
in ASCII format.
5) You are using a module in the script that is not installed on your server. Contact
support to request the installation of new modules. You will need to allow
at least 48 hours for modules to be installed. |