|
Support
Center
CGI Related
1. What is CGI?
2. Where should I put my
CGI files?
3. What are the correct paths to my CGI scripts?
4. What are the correct permissions for my CGI Scripts?
5. How do I change permissions on my CGI scripts?
6. What version of Perl do we have?
7. What other developmental languages does your server support?
What is CGI?
CGI, or Common Gateway Interface, is the most widely used scripting language
in the internet. It is a Unix-based scripting language used to enhance the
functions of a website. Most common interactive website functions that may
use CGI scripts are Guest book, Inquiry Forms, Databases, Polling Centers, Message boards,
among others.
Back
To Top
Where
should I put my CGI Files?
Our server supports a run-anywhere CGI BIN, or folder. So you may wish to
create any folder within your Httpdocs Directory to store and run your CGI
scripts. However, our server already has a default CGI-BIN Directory found
outside your Httpdocs Directory. We call this a non-web directory. If you
want to run scripts that handles confidential information, then we suggest
you run it here. However, this non-web CGI-BIN does
not support images that may run with a CGI script. So, if your CGI
scripts calls for images to run with it, you have to place it within your
Httpdocs Directory.
Note:
We highly suggest that if you run your CGI scripts in a directory inside
your Httpdocs, name it other than a CGI-BIN.
The default non-web CGI folder is already called CGI-BIN, so to avoid
confusion by the script as to what CGI folder to call, you may call your own
CGI folder such as CGIBIN, MYCGI, CGI_BIN, or any other, just not CGI-BIN.
Back
To Top
What
are the correct paths to my CGI Scripts?
path to perl: /usr/bin/perl
-w
path to date: /bin/date
Send_Mail path: /usr/sbin/sendmail
Full path to home
directory: /usr/local/psa/home/vhosts/yourdomain.com/httpdocs/
Note
on Full Path:
Since our server has a default non-web CGI-BIN Directory, you may use
/usr/local/psa/home/vhosts/yourdomain.com/cgi-bin/
if you are storing your CGI
Scripts in it.
Back
To Top
What
are the correct permissions for my CGI scripts?
All .cgi and .pl scripts can only run with a 755 (-rwxr--r--)
permission in our server.
Back
To Top
How
do I change the permission of my CGI scripts?
Changing the permission of your scripts can easily be done using your FTP
program. To do that, connect to your Server using your favorite FTP program.
Highlight the file that you wish to change permission. Right Click on the highlighted file then choose FTP
Commands -> Site. Enter SITE string
like this: chmod 755 name_of_file.
You can also use the UNIX
command of changing file permission. To do that, highlight the file that you
wish to change permission. Right
Click then choose chmod (UNIX).
The following are the
eqiuvalent UNIX command of changing file permission:
(755)
-rwxr--r--
(644) -rw-r--r--
(666) -rw-rw-rw-
(777) drwxrwxrwx
Back
To Top
What
version of Perl do we have?
We have Perl 5.006 currently
installed in our server.
Back
To Top
What
other developmental languages does your server support?
Aside from CGI, our server
supports PHP, ASP, and WAP.
Back To Top
|