www.onlinemediagroup.com
> Support
> Perl CGI
Perl CGI:
What are CGI
scripts?
CGI (Common Gateway Interface) is a process used by the
server to pass information between the user and an
application on the server. With CGI access, you can install
Perl scripts on your website for such things as feedback
forms, guestbooks, counters, and so on.
Can I run my own
CGI/Perl scripts?
Yes, you can create, upload and run your own CGI/Perl
scripts from your own private cgi-bin directory if this
option is available with your hosting plan.
What information and
server paths do I need to run a CGI script?
CGI scripts must be run from your cgi-bin directory. If you
do not have a cgi-bin, simply create one. CGI scripts need
to have a .cgi extension. PHP scripts need to have a .php
extension and can be run from any location within your web
space.
cgi-bin relative path =
/cgi-bin/yourscript.cgi
cgi url =
http://www.yourdomain.com/cgi-bin/yourscript.cgi
path to Perl = /usr/bin/perl
path to sendmail = /usr/sbin/sendmail *
path to the date program = /bin/date
*Note: All sendmail activity is actively
monitored and logged. Online Media Group strictly prohibits
any form of mass commercial email from or through its
computer network and will aggressively prosecute any offense
to the maximum allowed by law. Currently $11,000 per
offense.
Do you know where can
I find some free CGI scripts?
Here are a few resources for CGI scripts:
My CGI script is not
working, can you help me with it?
Our support does not cover CGI script debugging. We can not
provide troubleshooting for your CGI scripts. However, there
are lots of valuable resources available for programming
assistance on the Web.
Here are a few things to try when you are
troubleshooting a CGI script:
- First of all, thoroughly read through the
instructions that came with the script and also
check the website where the script was
downloaded for troubleshooting info and user
forums.
Check to see if the script was uploaded to the
server in the proper format (ASCII not
binary).
Make sure that there are not any DOS/Windows
carriage returns (ie. ^M) at the end of each
line in the script. This is usually caused by a
text editor or FTP program that is not properly
uploading your script in a Unix/Linux format. If
this is happening, try changing your code line
break settings or upload settings to
Unix/Linux.
Here's how this is done in Dreamweaver:
From the menu, go to Edit > Preferences >
Code Format, then change Line Breaks to "LF
(Unix)".
The ^M is actually the ASCII LF character.
Windows uses CR/LF, Mac uses CR and UNIX uses LF
as line terminators. Some FTP programs translate
the line terminators when doing an "ASCII" or
"text" transfer, but they do not do the
translation if it is a binary transfer.
Make sure your script points to the proper
location for perl: #!/usr/bin/ perl
Verify that all the paths are correct, including
your public directory path. Do not use the "www"
part of your domain in your public directory
path. See our server paths section for more
info.
Check to see if all the file permissions are set
correctly. Permissions can be set using an FTP
program that allows permissions to be set on
transfer. Typically scripts are set to be 755,
user: read, write, execute; group: read,
execute; other: read, execute (-rwxr-xr-x), but
you should always check your script instructions
or README to be sure.
PLEASE NOTE: For security purposes, within the
cgi-bin, script permissions should not be set
higher than 755, or user: read, write, execute;
group: read, execute; other: read, execute
(-rwxr-xr-x).
|
I'm having difficulty
setting up CGI scripts, are there any other
alternatives?
Yes, check out PHP. Much of what you can do with a CGI
script you can do using PHP.
|