Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-28-2004, 03:06 AM   #1
hanii
Confirmed User
 
Join Date: Mar 2002
Location: Moon
Posts: 449
server gurus please help! - Premature End of Script Headers

apache 2.0.46 (rhel es 3.0)

I am trying to run a perl script on my server, but when I try to run it via a web browser I get "Internal Server Error." The server error log says "premature end of script headers." The permissions are 755 on the cgi-bin directory and the script. This is the script i'm trying to run:

#!/usr/bin/perl -w

print "Content-type: text/html\n\n";

print "Hello, world.\n";


This is the directive I have in my httpd.conf file:

Directory "/home/users/*/www/cgi-bin">
Options ExecCGI
/Directory>
(removed '<' for banned word)

Anyone know what the problem could be?

Last edited by hanii; 02-28-2004 at 03:10 AM..
hanii is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 03:20 AM   #2
KDizzla
Confirmed User
 
Join Date: Sep 2002
Location: South Hampton
Posts: 1,795
Could be a number of things...
__________________
www.ogrish.com
KDizzla is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 03:48 AM   #3
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
watch error.log for the actual error.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 04:05 AM   #4
hoe_vender
Confirmed User
 
Join Date: Dec 2003
Location: Lincoln, NE
Posts: 2,018
__________________
ICQ #286508534
hoe_vender is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 04:10 AM   #5
420
cuck
 
420's Avatar
 
Industry Role:
Join Date: Mar 2003
Posts: 11,571
Quote:
Originally posted by hoe_vender
good job man, I knew with just a few more smilie posts you would pass 500 tonight

__________________
<!--BEGIN SIMUTRONICS PLAY BUTTON CODE -->
<p align="center">

<a href="http://buddy.play.net/dr?TMOREAU1">

<img src="drplay.gif" width="128" height="64" alt="Play DragonRealms!"></a></p>

<!--END SIMUTRONICS PLAY BUTTON CODE -->
420 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 04:34 AM   #6
devmug
Registered User
 
Join Date: Jan 2004
Posts: 3
might be control-m on the end of lines .. this sometimes produces premature blah errors .. try editing your source in a proper editor such as textpad and saving as file type unix or use vi on your server ... hope this helps.

Devmug
avsMatrix
__________________
Lex (devmug)
[email protected] | aol devmug | icq 249438559
http://www.sexcontents.com - Niche Adult Content
devmug is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 04:46 AM   #7
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
hi hanii

I do not have access to any rhel es 3.0 box to test this, but the problem very likely is because the script is not really executable.

Not sure if you have shell access, but if you have, then go and login to the server, go to the dir the script is at and run it manually.

eg: if the script is called helloworld.cgi then type: ./helloworld.cgi

See if that works. If that works, make sure the ending is .cgi and not .pl, since Options ExecCGI would only allow .cgi to execute as far as I remember.

If it does NOT work (which is very likely) then your path to perl will be wrong. It will say something like:
bash-2.0: /usr/bin/perl: No such file or directory

Easiest way to figure this out is typing:
whereis perl
on the prompt. This should give you the real location of perl on the server. It might also be perl5, ie:
whereis perl5

The error might also be a perl error. I do not see a perl error in the code you posted, but it might be a wrong upload like devmug suggested, meaning you have to upload the file in ASCII mode!


If you do NOT have shell access to the server, contact your host and ask them what the path to perl is, since that is the most likely error.
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 04:48 AM   #8
rounders
Confirmed User
 
Join Date: Sep 2003
Location: p0rn0stars & h0es
Posts: 2,931
check the suexec log
__________________
ICQ#: 153923840
rounders is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 05:01 AM   #9
RK
Confirmed User
 
Join Date: Aug 2001
Location: In a Bunker
Posts: 868
Are you using suexec?
The log is called suexec_log
__________________
Does anyone look down here?
RK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.