Affordable CGI Programming
CGI FAQ's are courtesy of Affordable CGI Programming.

My SSI call makes another banner pop-up appear? 
My formmailer works but doesn't send? 
Where is perl? sendmail? qmail? 
Why do I get error 500? 
Where can I get scripts? 
 

 

My SSI call makes another banner pop-up appear?
 

Use the following SSI command to call your script: 
     <!--#exec cmd="whatever.pl" --> 
or 
     <!--#exec cmd="/data1/hypermart.net/username/whatever.pl" --> 

and remove the line in the script that prints "Content-type: text/html\n\n" 
 

 

Back to Top

 


 

 

My formmailer works but doesn't send?
 

Be sure the path to the mail program points to 
     /var/qmail/bin/qmail-inject 

If you  are using FormMail be sure that the $mailprog line looks like this: 
     $mailprog = '/var/qmail/bin/qmail-inject'; 

 

Back to Top

 



 

Where is perl? sendmail? qmail?
 

Perl is located at: 
     /usr/local/bin/perl 
This means that the first line of any CGI script should read 
     #!/usr/local/bin/perl 

The sendmail program is called qmail and is located at: 
     /var/qmail/bin/qmail-inject 

 

Back to Top

 


 


 

Why do I get error 500?
 

(NOTE: These are general problem and may not apply to all scripts) : 
Be sure... 

You upload your script in ASCII, not binary or auto-detect. 

The first line in your script reads: 
     #!/usr/local/bin/perl 

Your script and the directory it is in are chmoded at least to 755. 

That any directories and/or files it writes to are chmoded at least to 666. 

That if the script asks for the path you use the path and not the URL: 
     Sample URL: 
          http://USERNAME.hypermart.net/cgi-bin/ 

     Sample path: 
          /data1/hypermart.net/USERNAME/cgi-bin/ 

Your script contains a line which looks like this: 
     print "Content-type: text/html\n\n"; 

If you entered an email address in a script variable that it has a \ before the @. For example: 
     $youremail = "webmaster\@whatever.com"; 
 
That you did not remove any " or ' or ;  when editing the script. 

Finally be sure to check the error log for your account to see what the specific error is. You can check your error log at the Hypermart Error Log. 

Error 500 is basically a default error. Any number of problems can cause it, and not knowing the specific error makes it very difficult, if not impossible for anyone to provide more help. So always check your error log for the specific error. 
 

Back to Top

 


 


 

Where can I get scripts?

Scripts Directory with over 500 FREE Scripts at ACP  

 

Back to Top