Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Perl (http://www.programmingforums.org/forum21.html)
-   -   Perl form handler (http://www.programmingforums.org/showthread.php?t=2396)

ZenMasterJG Feb 22nd, 2005 12:59 AM

Perl form handler <SOLVED!>
 
Hey all, Im not sure if this should have been in the Web forum or here, but if im wrong i'll move it.
At my school, the guys that manage the network are almost completly useless. They say that they do support Perl CGI scripts on our personal homepage space, but they don't specify HOW. I've done everything i can do on my end, change the filename to .cgi, looked for a cgi-bin directory, check, double checked, and check again the permissions on the directory, and any relevant files. But, whenever i try and USE the script I get one of them "You don't have permission to access foo.cgi" 403 Forbidden messages from the server. I've asked the admin about this, and he is clueless. What do I ask him to figure out what I need to do to get my scripts to run, since im pretty sure its on his end, not mine.

Thanks!

Mad_guy Feb 22nd, 2005 7:25 PM

Well, once you upload your .cgi script to your webhost, you have to do two things:

A. Modify the files permissions to 0755, preferably using an FTP program.
B. At the very top of the script, before anything else (excluding the shebang), you have to put this line:

:

print "Content-type: text/html\n\n";

Then it should work perfectly, also make sure that the shebang is pointing at the Perl interpreter on your server's system. Common mistake to accidently make it point tword your own. I do it sometimes.

ZenMasterJG Feb 22nd, 2005 8:17 PM

I did all that stuff, my admin just had the server configured funny and didnt remeber what directory he had allowed the scripts to run from (like cgi-bin, only he named the dir. "Documents" which is totally counter-intuative) I had to pester him with many emails to figure that one out. So this is solved. I'll go change the title.


All times are GMT -5. The time now is 5:30 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC