Reply
Internal Server Error...Apache 2 (Linux)
Old 09-11-2009, 12:55 PM Internal Server Error...Apache 2 (Linux)
Brian07002's Avatar
Defies a Status

Posts: 1,592
Name: ...
Location: ...
Trades: 0
I have tried 3 different cgi/pl scripts and all gave the same result. Internal Error 500. Check in my server logs and this is what I found in my error

Access log:
Code:
127.0.0.1 - - [11/Sep/2009:11:38:04 -0400] "GET /cgi-bin/scripts.cgi HTTP/1.1" 500 535
Error log:
Code:
[Fri Sep 11 11:38:04 2009] [error] [client 127.0.0.1] Premature end of script headers: dirpass.cgi
httpd.pid:
Code:
6073
The odd thing is when I tried this random script:

Code:
#!/usr/bin/perl
print "Content-type: text/plain\n\nHet werkt!\n";
It displayed the text: Het werkt!

I know the error 500 could mean anything from a permission setting to a bad script, but...3 scripts in a row? If you think I should try another script, I am looking for one which will password protect folders on a server. Need to have admin area to store usernames / passwords. Here's three I already tried: Directorypass, Locked-Area, DeadBolt.

All gave me the dreaded internal server 500 error message. Even though one script worked, could that mean a bad installation of apache2? The install seemed to go fine. And I couldn't see how one script could work, while others don't work...Especially 3 in a row. Please advise.

Thanks!
-Brian
__________________
Sig Less - Have some site you want me to put here? Will put here for a couple of paypal bucks.
Brian07002 is online now
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 09-14-2009, 12:55 AM Re: Internal Server Error...Apache 2 (Linux)
Junior Talker

Posts: 3
Name: stefan hinote
Location: Tucson, AZ, USA
Trades: 0
did the other scripts have the content-type set?

What are the permissions on the files, try setting them to 755 if there not already.
__________________
url: http://stefanhinote.com
email: stefan@stefanhinote.com

Last edited by stefanhinote; 09-14-2009 at 12:59 AM..
stefanhinote is offline
Reply With Quote
View Public Profile
 
Old 09-14-2009, 04:49 AM Re: Internal Server Error...Apache 2 (Linux)
tripy's Avatar
Do not try this at home!

Posts: 3,176
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The blame seems to be placed more on the scripts than you installation:
http://httpd.apache.org/docs/1.3/mis...script-headers
http://htmlfixit.com/cgi-tutes/tutor....php#premature

In short, try to look in the cgi file if they include the line
Code:
print "Content-type: text/html\n\n";
somewhere. If not, this is the problem.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-14-2009, 07:13 PM Re: Internal Server Error...Apache 2 (Linux)
Brian07002's Avatar
Defies a Status

Posts: 1,592
Name: ...
Location: ...
Trades: 0
I fixed this...Found out that I had a corrupted cgim module. When I re-installed apache, everything turned out fine. It was a major pain to figure out, but when all else fails, you have to start from scratch...That helped.
__________________
Sig Less - Have some site you want me to put here? Will put here for a couple of paypal bucks.
Brian07002 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Internal Server Error...Apache 2 (Linux)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.17415 seconds with 13 queries