Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX - forked.net   » General Discussion   » apache, cgi and perl

UBBFriend: Email this page to someone!    
Author Topic: apache, cgi and perl
g3t
Junior Member
Member # 160

posted October 19, 2001 05:41 PM      Profile for g3t        Edit/Delete Post  Reply With Quote 
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..... ?


Posts: 9 | Registered: Oct 2001  |  IP: Logged
willy wonka
Member
Member # 32

posted October 22, 2001 08:10 AM      Profile for willy wonka   Author's Homepage        Edit/Delete Post  Reply With Quote 
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


Posts: 92 | Registered: Aug 2001  |  IP: Logged
Ziwdam
Junior Member
Member # 190

posted October 24, 2001 08:33 PM      Profile for Ziwdam        Edit/Delete Post  Reply With Quote 
quote:
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:

code:
 tr '\r' '\n' < file > file.out 

That will convert file from Mac line endings to UN*X line endings, and save the output into file.out.


Posts: 4 | From: Nowhere land | Registered: Oct 2001  |  IP: Logged
Devin Ceartas
Junior Member
Member # 702

posted October 25, 2003 05:42 PM      Profile for Devin Ceartas   Email Devin Ceartas   Send New Private Message      Edit/Delete Post  Reply With Quote 
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


Posts: 3 | From: US | Registered: Oct 2003  |  IP: Logged

All times are Pacific Time  

Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Hop To:

Contact Us | macosx.forked.net

Powered by Infopop Corporation
Ultimate Bulletin BoardTM 6.1.0.2