apache, cgi and perl

Everything else.

apache, cgi and perl

Postby g3t » Sat Oct 20, 2001 12:41 am

This is kinda off-topic but.. I see you have ultimatebb runnin..

I have web sharing enabled on 10.1, and when I go to exec a .pl or .cgi I get this error...

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

------------------------------------------------------------------------
Apache/1.3.20 Server at 127.0.0.1 Port 80

I read the apache help docs and set the the files are all chmod'd 755...

Here's the error in the apache error_log:

[Fri Oct 19 16:27:21 2001] [error] [client 64.241.221.45] Premature end of script headers: /Library/WebServer/Documents/cgi-bin/hello.pl
[Fri Oct 19 16:27:34 2001] [error] (2)No such file or directory: exec of /Library/WebServer/Documents/cgi-bin/hello.cgi failed
[Fri Oct 19 16:27:34 2001] [error] [client 64.241.221.45] Premature end of script headers: /Library/WebServer/Documents/cgi-bin/hello.cgi

I do not know what to do next..... ?
g3t
 
Posts: 9
Joined: Sat Oct 13, 2001 7:00 pm

Re: apache, cgi and perl

Postby orange1 » Mon Oct 22, 2001 3:10 pm

first thing i would check would be if you have a one line file with a buttload of ^M characters in it.
if so, delete them and replace with return carriages.

....

at least i think this effects osx. it was keeping me from compiling cpp files. if you have a nice text editor [mmmm, bbedit], you can set it to save files with unix endlines, instead of mac ones.
--
-willy
Freedom will henceforth be compulsory. -Random Party Manifesto
orange1
 
Posts: 92
Joined: Tue Aug 21, 2001 7:00 pm

Re: apache, cgi and perl

Postby ziwdam » Thu Oct 25, 2001 3:33 am

Originally posted by willy wonka:
first thing i would check would be if you have a one line file with a buttload of ^M characters in it.
if so, delete them and replace with return carriages.


You can also do this in Terminal.app:
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre> tr '\r' '\n' < file > file.out </pre>[/quote]

That will convert file from Mac line endings to UN*X line endings, and save the output into file.out.
ziwdam
 
Posts: 4
Joined: Wed Oct 24, 2001 7:00 pm
Location: Nowhere land

Re: apache, cgi and perl

Postby Devin » Sun Oct 26, 2003 12:42 am

The wrong line endings will definitely make a difference.

What you've given isn't too much to go on, but here are some other things to check --

look in the apache error_log ([usr]/local/apache/logs/error_log) for useful hints

run the script from the command line and look for error messages.

-- devin
Devin
 
Posts: 3
Joined: Sat Oct 25, 2003 7:00 pm
Location: US


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron