Web Hosting Talk







View Full Version : CGIWrap error


WoodShedd
03-16-2002, 10:21 PM
while trying to run a cgi script, i receive a cgiwrap error.

I have read the error message, considered its advice and concluded that none of it is pertinent.

Is anyone familiar with these errors and the solution?


CGIWrap encountered an error while attempting to execute this script:

Error Message: No such file or directory
Error Number: 2
This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script.
If you are not the owner of this script, please forward this error and the URL that caused it to the script owner. That is often the component in the URL right after /cgiwrap/.

serve-you
03-16-2002, 10:57 PM
Are you sure that the script does not have line breaks that you can't see? I have had numerous scripts that in vi looked fine, but if I ran them through dos2unix, they worked like a champ.

Just a thought.

-Dan

ASPCode.net
03-17-2002, 09:17 AM
There is a way of getting some more error info:

Lets say you are trying to execute the file
http://www.domain.com/test/test.cgi

To get extended debug information just

http://www.domain.com/cgiwrapDir/cgiwrapd/test/test.cgi

The cgiwrapDir/cgiwrapd is entered just after the domain name

Although there are some things with cgiwrap that's just doesn't make sense - for example I could not get PerlDesk to work - on some pages I got cgiwrap error on others I didn't.

WoodShedd
03-17-2002, 03:36 PM
I think the problem is that I have the !# line wrong. how would i determine the location of perl?

it doesnt seem to be at /usr/bin/perl or /usr/local/bin/perl

serve-you
03-17-2002, 03:58 PM
try 'which perl'

-Dan

WoodShedd
03-17-2002, 04:23 PM
thanks, Dan.

I've got the #! line right now, and the CGIWrap error is gone. Now i get an internal server error :angry: .


no luck today, i tell you.

jahsh
03-19-2002, 08:27 PM
make sure the script isnt owned by root and also make sure its executable.