Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 22nd, 2005, 1:59 AM   #1
ZenMasterJG
Hobbyist Programmer
 
ZenMasterJG's Avatar
 
Join Date: Nov 2004
Location: Boston, MA
Posts: 148
Rep Power: 4 ZenMasterJG is on a distinguished road
Send a message via AIM to ZenMasterJG
Question 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!

Last edited by ZenMasterJG; Feb 22nd, 2005 at 9:17 PM.
ZenMasterJG is offline   Reply With Quote
Old Feb 22nd, 2005, 8:25 PM   #2
Mad_guy
Hobbyist Programmer
 
Mad_guy's Avatar
 
Join Date: Oct 2004
Location: Sandstorm, Techno Club
Posts: 239
Rep Power: 5 Mad_guy is on a distinguished road
Send a message via AIM to Mad_guy Send a message via MSN to Mad_guy
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.
Mad_guy is offline   Reply With Quote
Old Feb 22nd, 2005, 9:17 PM   #3
ZenMasterJG
Hobbyist Programmer
 
ZenMasterJG's Avatar
 
Join Date: Nov 2004
Location: Boston, MA
Posts: 148
Rep Power: 4 ZenMasterJG is on a distinguished road
Send a message via AIM to ZenMasterJG
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.
ZenMasterJG is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:10 PM.

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