Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with perl execution from user directories

Status
Not open for further replies.

cblanzy

ISP
May 18, 2001
22
US
when i try to execute a perl script from a user directory I get an error about not being allowed to post with this user. Is this some type of permision issue?

The error returned to the web browser
The requested method POST is not allowed for the URL /~nichols/cgi-bin/FormMail.pl.

The begining of my html code
<form method=&quot;post&quot; action=&quot;cgi-bin/FormMail.pl&quot;>


I'm a newbie to apache

i'm runing apache ver 1.3.17 on freeBSD
 

Check out the perl path(usually /usr/bin/perl) provided to the perl program (#!/usr/bin/perl)

Also check out the correctness of syntax
using : perl -c perlprogram.pl

Hope this may work for U
 
I double and triple checked the path and it's correct, I also checked the syntax of the .pl and it's correct also. There seems to be soemthign else preventing this user from posting though. This is a web server my company runs hosting many sites. I know other users can execute cgi from their respective directories. How do I give a permision to execute cgi from their home directory?
 
Make sure that the program is chmod'ed to 755 (owner read/write/execute, group read/execute, user read/execute), and also make sure you have your extension right. Often times web hosts will only set up the CGI handler to accept .cgi files. Sometimes it's because they've got mod_perl taking care of the .pl files (you have to be pretty strict about how you program if you want to use this module.. prototype subroutines, declare all public vars, etc.. but it's *fast*), and sometimes it's out of plain ignorance... but it happens. Lastly, make sure your script is in a directory that has the ExecCGI attribute. You can check with your web host to find out if that's the case...

Hope this helps,

brendanc@icehouse.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top