Re: run perl scrip with post form from apache
Thanks for you pointers, they helped me to move further on into different problem. I added the addhandler statement and ExecCGI There are no Limit/Limit at all The httpd-error.log has these messages now (2)No such file or directory: exec of /usr/local/www/data/sim.pl failed [client ] Premature end of script headers: /usr/local/www/data/sim.pl I haven't followed the whole thread, just seen this piece. But, whenever I have seen that error message (and it has been many times) I discovered that the blank line ending the header in the page I am trying to write back out is missing. It has to have a completely empty line - not even any white space characters on it. Sometimes it got that way because some part of my cgi code failed and sometimes it was because I just forgot to include the double newline (\n\n) in my print statement. I won't guarantee that is it, but is something to check. jerry The sim.pl file is in that directory and it was given to me as am working script. Any idea what is wrong now ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: run perl scrip with post form from apache
At 09:29 AM 2/28/2004, fbsd_user wrote: The requested method POST is not allowed for the URL /sim.pl. Any ideas on how to get this to work? Do you have AddHandler cgi-script .cgi .pl specified in your httpd.conf file? Marty Landman Face 2 Interface Inc. 845-679-9387 FormATable DB: http://face2interface.com/Products/FormATable.shtml Make a Website: http://face2interface.com/Home/Demo.shtml Free Formmailer: http://face2interface.com/Products/Formal.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: run perl scrip with post form from apache
On Sat, Feb 28, 2004 at 09:29:56AM -0500, fbsd_user wrote: I keep getting this error message when I try to run an perl script from an apache web page that is trying to post an form. I have mod_perl-1.28 and p5-WWW-Mechanize Method Not Allowed, The requested method POST is not allowed for the URL /sim.pl. Any ideas on how to get this to work? Check your apache configuration -- perhaps you have a Limit/Limit block that forbids POST to that URL. You should see a bit more detail in the httpd-error.log Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
RE: run perl scrip with post form from apache
Thanks for you pointers, they helped me to move further on into different problem. I added the addhandler statement and ExecCGI There are no Limit/Limit at all The httpd-error.log has these messages now (2)No such file or directory: exec of /usr/local/www/data/sim.pl failed [client ] Premature end of script headers: /usr/local/www/data/sim.pl The sim.pl file is in that directory and it was given to me as am working script. Any idea what is wrong now -Original Message- From: Marty Landman [mailto:[EMAIL PROTECTED] Sent: Saturday, February 28, 2004 9:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] ORG Subject: Re: run perl scrip with post form from apache At 09:29 AM 2/28/2004, fbsd_user wrote: The requested method POST is not allowed for the URL /sim.pl. Any ideas on how to get this to work? Do you have AddHandler cgi-script .cgi .pl specified in your httpd.conf file? Marty Landman Face 2 Interface Inc. 845-679-9387 FormATable DB: http://face2interface.com/Products/FormATable.shtml Make a Website: http://face2interface.com/Home/Demo.shtml Free Formmailer: http://face2interface.com/Products/Formal.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: run perl scrip with post form from apache
On Sat, Feb 28, 2004 at 11:11:19AM -0500, JJB wrote: The httpd-error.log has these messages now (2)No such file or directory: exec of /usr/local/www/data/sim.pl failed [client ] Premature end of script headers: /usr/local/www/data/sim.pl The sim.pl file is in that directory and it was given to me as am working script. Check the ownership/permissions on the sim.pl file -- sounds like the apache process doesn't have permission to read and/or execute the file. You probably want it to be mode 555 or 550 with the group set to the same as the apache process. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
RE: run perl scrip with post form from apache
All ready had sim.pl set as 770 and owner as www and group as wheel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Matthew Seaman Sent: Saturday, February 28, 2004 11:36 AM To: JJB Cc: Marty Landman; [EMAIL PROTECTED] ORG Subject: Re: run perl scrip with post form from apache On Sat, Feb 28, 2004 at 11:11:19AM -0500, JJB wrote: The httpd-error.log has these messages now (2)No such file or directory: exec of /usr/local/www/data/sim.pl failed [client ] Premature end of script headers: /usr/local/www/data/sim.pl The sim.pl file is in that directory and it was given to me as am working script. Check the ownership/permissions on the sim.pl file -- sounds like the apache process doesn't have permission to read and/or execute the file. You probably want it to be mode 555 or 550 with the group set to the same as the apache process. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: run perl scrip with post form from apache
fbsd_user wrote: All ready had sim.pl set as 770 and owner as www and group as wheel The httpd-error.log has these messages now (2)No such file or directory: exec of /usr/local/www/data/sim.pl Just a thought - where does your ScriptAlias line in httpd.conf point? The default is: ScriptAlias /cgi-bin/ /usr/local/www/cgi-bin/ and your script needs to be in there to execute as cgi. Your script is in the document root /usr/local/www/data PWR. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: run perl scrip with post form from apache
On Sat, Feb 28, 2004 at 12:17:34PM -0500, fbsd_user wrote: All ready had sim.pl set as 770 and owner as www and group as wheel Ah. Then check the #! line at the top of the script -- it should read: #!/usr/bin/perl (possibly with a few flags appended). Make sure you can run sim.pl from the command line -- it will probably just sit there waiting for input, but if you hit Ctrl-D it should print something out. Running 'perl -cw' on the script might be a good idea as well. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: run perl scrip with post form from apache
At 12:43 PM 2/28/2004, Matthew Seaman wrote: Make sure you can run sim.pl from the command line [snip[ Running 'perl -cw' on the script might be a good idea as well. I'll second that and add that if you can run fine from the CLI then try running it as standalone from your browser. If that works as well then you may be right about having a problem with your Apache config. Let us know and post back with the output including httpd-error log if it gets that far. Marty Landman Face 2 Interface Inc. 845-679-9387 FormATable DB: http://face2interface.com/Products/FormATable.shtml Make a Website: http://face2interface.com/Home/Demo.shtml Free Formmailer: http://face2interface.com/Products/Formal.shtml ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]