CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Perl Error

 



mike robb
Deleted

Sep 14, 2000, 4:22 PM

Post #1 of 3 (222 views)
Perl Error Can't Post

I am running a perl script on a linux server via apache web server.

I try to run the cgi file and get the following error in the apache error log:
[Thu Sep 14 20:13:43 2000] [error] (2)No such file or directory: exec of /home/q
8/public_html/cgi-bin/spt/spmail/spmail.cgi failed
[Thu Sep 14 20:13:43 2000] [error] [client 209.245.237.141] Premature end of scr
ipt headers: /home/q8/public_html/cgi-bin/spt/spmail/spmail.cgi


if I do an ls of the file it says it can not find it shows that it can find it:
l /home/q8/public_html/cgi-bin/spt/spmail/spmail.cgi
-rwx--x--x 1 q8 q8 11384 Sep 14 19:53 /home/q8/public_html/cgi
-bin/spt/spmail/spmail.cgi

It is set to XX for Group/world now - I had tried it with RX RX for G/W just before this ls output - both chmod's result in the same error in the server log.

Does anyone know what could possibly be causing this error?

Thanks! Smile

--Mike


Kanji
User

Sep 14, 2000, 5:18 PM

Post #2 of 3 (222 views)
Re: Perl Error [In reply to] Can't Post

The error is mostly likely referring to the /path/to/program from your scripts shebang line (#!), as you cannot exec() a script if there's no interpreter to run it through.

If the /path/to/program appears valid, then check to make sure you don't have ^M's at the end of the line (they'll show up in an editor like vi, but won't if you use cat or more), which is usually the sign of editing the script on Windows and FTPing the file in binary mode instead of ASCII.

[This message has been edited by Kanji (edited 09-14-2000).]


mike robb
Deleted

Sep 14, 2000, 6:00 PM

Post #3 of 3 (222 views)
Re: Perl Error [In reply to] Can't Post

thanks.

/usr/bin/local/perl
and
/usr/bin/perl
are defined on one server and
only
/usr/bin/perl
on the other.....


so the files that have "local" in them
are bombing!

thanks so much..


cheers.

--mike


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives