![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Sep 2002
Location: South Hampton
Posts: 1,795
|
Could be a number of things...
![]()
__________________
www.ogrish.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Dec 2003
Location: Lincoln, NE
Posts: 2,018
|
![]()
__________________
ICQ #286508534 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
cuck
Industry Role:
Join Date: Mar 2003
Posts: 11,571
|
Quote:
![]()
__________________
<!--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 --> |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Sep 2003
Location: p0rn0stars & h0es
Posts: 2,931
|
check the suexec log
__________________
ICQ#: 153923840 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |