i n f o
about us
technical
payment
contact
s e r v i c e s
packages
server
design
sign up
s u p p o r t
instructions
F.A.Q.
password
m i s c
resellers
offers
free
h o m e
|
| |
CGI scripts can be valuable tools to interact with visitors to your site. To get your scripts working, you will need to upload them in ASCII mode and set them to be executable (mode 700).
|
| Some commonly needed information |
- Path to sendmail: /usr/lib/sendmail
- Home directory: log in using ftp, and see where you start out. or, log in using telnet, and type "pwd"
- Web root directory: (home directory)/www
- cgi-bin directory: (home directory)/www/cgi-bin
- PERL shell: /usr/local/bin/perl or /usr/bin/perl
|
| Some common mistakes |
FTP mode Many FTP clients don't know that *.pl and *.cgi files should be uploaded in ASCII mode, and use binary instead. This results in a CGI that has an extra character (control-M) at the end of each line, and won't work.
Permissions If your CGI script's instructions tell you to set the mode of a file or directory to 777, don't do it. Their instructions incorrectly assume that your web server runs CGI insecurely, and needs these permissions to be set. If you set a directory or CGI script to mode 777, the web server will refuse to run it due to the insecure permissions you gave it (and tell you "500 internal server error").
| Correct permissions |
CGI scripts: 700 (secure) or 755 (publicly readable)
Data files: 600 (secure) or 644 (publicly readable)
Directories: 755
All other files: 644 |
|
| Other useful information |
Filenames You can name a file *.cgi and put it anywhere inside your "www" directory and it will work. The cgi-bin directory forces anything inside to be treated as a CGI, regardless of filename. All HML files and pictures must be outside the cgi-bin directory.
Compilers The "c" compiler is gcc, the "c++" compiler is g++. A typical compile command is "gcc myprogram.c -o myprogram".
|
|