| CGI Scripts & Databases
What is CGI?
CGI, Common Gateway Interface, includes programs that run on the
server to enhance the quality and functionality of a web site.
Do you allow CGI to
run on your servers?
We do allow running of cgi scripts on the servers.
Where can I put my
CGI scripts?
CGI scripts are executable from anywhere, or from within the cgi-bin
directory in your home directory. If you use Microsoft FrontPage,
it is recommended that you put them within your cgi-bin directory
so FrontPage will not change your permission settings on these files.
What is the path to
Perl?
/usr/bin/perl
What is the path to
sendmail?
/usr/sbin/sendmail
What is the full path
to my cgi-bin?
/usr/local/yourusername/cgi-bin
Replace yoursite.com with your domain name.
What is the path to
my web space?
/usr/local/psa/home/vhosts/yourdomain.com/httpdocs
Replace yoursite.com with your domain name.
What version of PHP
is installed on your server?
We are using version 4.2.2.
What version of perl
is installed on your server?
We are using perl version 5.006.
Why doesn't my CGI
work?
Make sure when you upload the CGI file DO NOT upload in binary mode,
instead use ASCII mode. Uploading in binary will cause the server
not to recognize the scripts as executables. Most FTP clients will
upload .pl or .cgi files in binary mode by default so you will need
to change this. You will need to upload the scripts into your cgi-bin
directory for security reasons, however they will execute from anywhere
within your account. The last step is to set the file permissions.
This is otherwise known as chmoding and can be done from most FTP
clients. Make sure you CHMOD your scripts to "755" otherwise
you will get errors.
Can you help me troubleshoot
my script?
No. Contact the authors of that software for the documentation/help
files.
Why Does My CGI script
give me a Permission Denied Error?
CGI scripts need to be set executable. You need to change the mode,
or permissions, of your programs with your FTP program, and make
them 755, or rwxr-xr-x. Note: A lot of scripts out there will tell
you need to make them 775 or even 777. This is not good! It means
anyone on the server can write to your script, and since its executable
and executes as you, it could delete all your files!
I keep getting a 500
Internal Server Error. Why?
There are many different possibilities. If you have a problem, misconfiguration,
or syntax error in you script, you will probably be able to find
it by checking your error logs which can be found in your your control
panel under "Statistics -> Show Error Logs".
Although this is generally caused by a problem within the script,
many times it is caused by incorrect file permissions either on
the script itself, or another file or directory used by the script.
You should also verify the that the script paths are set correctly.
You should verify that the first line of your script is the path
to Perl, and that it is correct. It should be set to: /usr/bin/perl.
You should also verify that the scripts were uploaded in the correct
mode (ASCII or Binary - check the readme for the scripts to see
any special instructions. Normally it is ASCII). Another problem
could be permissions of the file or directory. Your script permissions
should be 755, or rwxr-xr-x.
What is PHP?
The folks over at PHP.net say it best... "PHP is a server-side,
cross-platform, HTML embedded scripting language." In other
words, PHP is a programming language, similar to HTML, but is parsed
by the server, rather than the browser. It is often used with databases
to build sites with dynamic content.
|