Home > Archive > PERL CGI Beginners > February 2005 > Premature End Of Script Headers and MORE
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Premature End Of Script Headers and MORE
|
|
| surfcaster 2005-02-24, 3:55 am |
| Hi to all,
Gee, I don't know where to start.
First of all, I Don't know why I get the suexec error in the log listed
below because when I 'apachectl -V' the '-D SUEXEC BIN="/...../suexec'
and that file doesn't exist where this variable points to, I think! that
means apache won't use it. I have read all I can and try everything
without any results.
Second, the old "premature End Of script headers" problem. Im lost on
this. I have searched the i-net for days, tryied a bunch of thing, and
haven't had any change.
OH, one more thing, In the users directory for the public_html directory
is really a link to the public_html directory. Seems to work OK for
displaying webpages.
I have included the test.pl script.
Any help would be appreciated
Stan
Apache Version 2.0.40
Perl 5.8.0
Tomcat 5.5.4.0
Linux 9 2.4.20-31.9
JVM Version 1.5.0-b64
========================================
========
File: access_log Col 0 310 bytes
100%
========================================
========
69.1xx.xx.xx - - [23/Feb/2005:13:00:57 -0500] "GET /~surf/cgi-bin/test.pl
HTTP/1.1" 500 672 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.0)"
69.1xx.xx.xx - - [23/Feb/2005:13:00:59 -0500] "GET /~surf/cgi-bin/test.pl
HTTP/1.1" 500 672 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.0)"
========================================
=========
File: error_log Col 0 196 bytes
100%
========================================
=========
[Wed Feb 23 13:00:57 2005] [error] [client 69.1xx.xx.xx] Premature end of
script
headers: test.pl
[Wed Feb 23 13:00:59 2005] [error] [client 69.1xx.xx.xx] Premature end of
script
headers: test.pl
========================================
==========
File: suexec.log Col 0 264 bytes
100%
========================================
==========
[2005-02-23 13:00:57]: uid: (500/surfxxxxxx) gid: (4/4) cmd: test.pl
[2005-02-23 13:00:57]: cannot run as forbidden gid (4/test.pl)
[2005-02-23 13:00:59]: uid: (500/surfxxxxxx) gid: (4/4) cmd: test.pl
[2005-02-23 13:00:59]: cannot run as forbidden gid (4/test.pl)
========================================
==========
PERL SCRIPT
========================================
==========
#!/usr/bin/perl
use CGI; # don't need qw(:standard)
my $cgi = CGI->new; # ($cgi is now the object)
use strict;
print $cgi->header; # function call: $obj->function
print $cgi->start_html("Hello World");
========================================
==========
OUTPUT OF SCRIPT TEST.PL
========================================
==========
[surfxxxxxx@surfxxxxx cgi-bin]$ perl test.pl
Content-Type: text/html; charset=ISO-8859-1
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head><title>Hello World</title>
</head><body>
========================================
===========
File Attributes
========================================
===========
4 -rwxr-xr-x 1 surfxxxxxx xxx 364 Feb 23 12:06 test.pl
========================================
===========
========================================
===========
| |
| surfcaster 2005-02-25, 8:55 am |
| Whelp, Sorry for the post, I found my problem. Just in case someone else
had this problem, I originally installed the apache server with RH9 and
then installed an updated version of Apache. Without relizing what I did,
was to break the links to SERVICE HTTPD START|RESTART|STOP. After
investigating furthere, I corrected the script files to point to the proper
Apache.
I found this out after hard deleting the original apache that RH9
installed.
Everything is running fine now and the correct HTTPD and CONFIG file is
running.
Stan
surfcaster <seabreezecove@hotmail.com> wrote in
news:Xns9606EA4EA7A46sfishwish@216.196.97.142:
> Hi to all,
> Gee, I don't know where to start.
> First of all, I Don't know why I get the suexec error in the log
|
|
|
|
|