How to delete a photo from a blog?
Premature end of script headers
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Ñîîáùåñòâà
• Talxy Chat
• Horoscope
• Online
 
Çàðåãèñòðèðóéñÿ!

QAIX > Apache HTTP Server > Premature end of script headers 16 November 2008 23:41:52

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Premature end of script headers

Qingjuan Gu 16 November 2008 23:41:52
 Hi everybody,

When I brwoser this perl script on the web broswer, it gives error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request

In error.log:
[Tue Jun 25 14:20:22 2002] [error] [client 130.91.8.66] Premature end of script headers: /db4/usr/local/www/­html_files/cgi-bin/mboss.pl

But other cgi or perl script in the same directory work fine.

I do not know hwat is wrong with this script, here is this script:
#!/compbio/programs­/perl-5.6.1/bin/perl­5.6.1

use CGI;
use EMBOSS::GUI;

my $cgi = new CGI;
print "Content-type: text/html\r\n\r\n";­
init('/compbio/prog­rams/emboss/share/EM­BOSS', '/compbio/programs/­emboss/bin', '/db4/usr/local/www­/html_files/html/EMB­OSS', 'http://athena
.wistar.upenn.edu/E­MBOSS', 'http://athena.wist­ar.upenn.edu/cgi-bin­', 0);
for ($cgi->param("_acti­on")) {
/^mmenu/ and do { mmenu($cgi); last; };
/^input/ and do { input($cgi); last; };
/^run/ and do { run($cgi); last; };
/^help/ and do { help($cgi); last; };
/^manual/ and do { manual($cgi); last; };
/^search/ and do { search($cgi); last; };
}
print "\n";
~
Any idea will be appreciated greatly.

Grace
Add comment
Jason Murray 6 August 2001 07:32:09 permanent link ]
 
Hello All,> writing to a flat file I am getting 500 error with Apache. I > know the path is correct and when I delete the file.txt and try > to write to it. A new file is created but no writing. What does > Premature end of script headers: mean?

It usually means the execution of the script aborted in a way that
Apache wasn't expecting - I'd say something has gone seriously wrong
in the script, you might want to add a few debugging statements and
see from there where a problem may lie.

Jason
Add comment
Gary 6 August 2001 08:32:05 permanent link ]
 Hello All,
writing to a flat file I am getting 500 error with Apache. I know the path
is correct and when I delete the file.txt and try to write to it. A new file
is created but no writing. What does Premature end of script headers: mean?

TIA
Gary


Add comment
Richard Lynch 9 August 2001 12:35:58 permanent link ]
 
writing to a flat file I am getting 500 error with Apache. I know the path> is correct and when I delete the file.txt and try to write to it. A new
file> is created but no writing. What does Premature end of script headers:
mean?

It means "Check your Apache error_log files because PHP and/or Apache died a
horrible death."

If there's nothing there, it means "Read the instructions on
http://bugs.php.net­ about generating a back-trace".

:-)­

--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/ar­tists.htm
Volunteer a little time: http://chatmusic.co­m/volunteer.htm


Add comment
Ryan Fischer 26 August 2001 18:31:25 permanent link ]
 You wrote:> hi.> what is the meaning of:> Premature end of script headers.

The script headers terminated before the double-newline. Probably
because you sent content to the browser before sending a content type.
Or some type of error occured, which there will be information about in
the error log. This sounds more like a Perl or other CGI app issue,
rather than a PHP issue, though, because PHP errors get sent to the
browser.

--
-Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboar­d.net/


Add comment
Nafiseh Saberi 27 August 2001 12:54:56 permanent link ]
 
hi.
what is the meaning of:
Premature end of script headers.

thanks.
Add comment
SAWMaster 19 September 2001 21:28:13 permanent link ]
 What is wrong with this line?

print qq~</FORM>\n~;


Some reserved word in there?

The error is "Premature end of script headers....if that helps.

If I take that line out it works fine (CGI wise, not HTML wise)

Can someone help me?

-Dave
Add comment
Brett W. McCoy 19 September 2001 21:54:36 permanent link ]
 On Wed, 19 Sep 2001, SAWMaster wrote:
What is wrong with this line?>
print qq~</FORM>\n~;>
Some reserved word in there?>
The error is "Premature end of script headers....if that helps.>
If I take that line out it works fine (CGI wise, not HTML wise)>
Can someone help me?

Of course, without seeing the code in context, it's hard to say why a
single line wouldn't be working correctly.

-- Brett
http://www.chapelpe­rilous.net/
-------------------­--------------------­--------------------­-------------
Sho' they got to have it against the law. Shoot, ever'body git high,
they wouldn't be nobody git up and feed the chickens. Hee-hee.
-- Terry Southern

Add comment
Brett W. McCoy 19 September 2001 22:30:57 permanent link ]
 On Wed, 19 Sep 2001, SAWMaster wrote:
#!c:\perl\bin\perl -w>
use DBI;> $dbh = DBI->connect('dbi:O­DBC:gallery');> print "Content-type: text/html\n\n";> print qq~<LINK HREF="/wholesalegal­lery/wg.css" REL="stylesheet"> TYPE="text/css">~;>­ print qq~<HTML>\n~;> print qq~<CENTER>\n<H1>On­line Gallery</H1>\n</CEN­TER>\n~;> $sqlstatement="SELE­CT pid, name, description, picture, opendate, price FROM> gallery ORDER BY pid";> $sth = $dbh->prepare($sqls­tatement);> $sth->execute || die "Could not execute SQL statement ... maybe invalid?";> print qq~<FORM NAME = GALLERY>\n~;> print qq~<TABLE WIDTH = 100%>\n~;> while (@row=$sth->fetchro­w_array)> {> print qq~<TR><TD ROWSPAN = 5>$row[3]</TD><TD = 50%>Product ID:> $row[0]</TD>\n~;> print qq~<TR><TD WIDTH=50%>Product name: $row[1]</TD></TR>\n~;>­ print qq~<TR><TD WIDTH=50%>Descripti­on: $row[2]</TD></TR>\n~;>­ print qq~<TR><TD WIDTH=50%>Opening date: $row[4]</TD></TR>\n~;>­ print qq~<TR><TD WIDTH=50% VALIGN="top">Price:­ \$~;> printf "%.2f", $row[5];> print qq~<INPUT TYPE = CHECKBOX NAME = $row[0]>BUY<BR>\n~;> print qq~</TD></TR>\n~;> print qq~<TR><TD COLSPAN = 2><HR></TD></TR>\n~­;> }> print qq~</TABLE>\n~;> print qq~</FORM>\n~;> print qq~</HTML>\n~;

Your HTML is not structured correctly because you don't have
<BODY></BODY> enclosing everything.

For things like this, I recommend using HERE docs or CGI.pm -- it's
difficult to read and debug the HTML with all of those print statement,
and CGI.pm takes care of things like headers, CGI parameter parsing and
will make your life a lot esier in the long run.

-- Brett
http://www.chapelpe­rilous.net/
-------------------­--------------------­--------------------­-------------
Someone is unenthusiastic about your work.

Add comment
Randal L. Schwartz 19 September 2001 22:53:23 permanent link ]
 
"Brett" == Brett W McCoy <bmccoy@chapelperil­ous.net> writes:

Brett> On Wed, 19 Sep 2001, SAWMaster wrote:>> What is wrong with this line?>>
print qq~</FORM>\n~;>>
Some reserved word in there?>>
The error is "Premature end of script headers....if that helps.>>
If I take that line out it works fine (CGI wise, not HTML wise)>>
Can someone help me?

Brett> Of course, without seeing the code in context, it's hard to say why a
Brett> single line wouldn't be working correctly.

Right. The line ahead of it might be:

die "Premature end of script headers....if that helps.\n";

We haven't even yet established that this is CGI, fercrissakes.

Context, people. Context. We ain't psychic. Tell us what
you were trying to do, what you did, what it said, and WHAT YOU'VE DONE
to try to solve it on your own, first.

Doesn't it say something like that in the VERY FREQUENTLY POSTED
FAQ?

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.­com> <URL:http://www.sto­nehenge.com/merlyn/>­
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stoneh­enge.com for onsite and open-enrollment Perl training!
Add comment
Tshering Norbu 24 October 2001 15:11:02 permanent link ]
 Hi list,
What/why this error:

[Wed Oct 24 17:03:33 2001] [error] [client 127.0.0.1] Premature end of
script headers: c:/php4win/php.exe


Thanks,
NOBBY


Add comment
Richard Verdugo 31 May 2002 21:56:20 permanent link ]
 Hello,
Can somebody give me a clue as to what this cgi error message means?
premature end of script headers: /var/www/cgi-bin/of­fice.cgi

Thank You
Richard Verdugo
___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Scott Campbell 31 May 2002 22:07:36 permanent link ]
 We will need to see the script in order to help.
Does the error give a line number?

Scott Campbell
Senior Software Developer
Somix Technologies
(207) 324-8805
http://www.somix.co­m

-----Original Message-----
From: activeperl-admin@li­stserv.ActiveState.c­om
[mailto:activeperl-admin@listserv.ActiveState.com] On Behalf Of Verdugo,
Richard
Sent: Friday, May 31, 2002 2:56 PM
To: activeperl@listserv­.activestate.com
Subject: Premature end of script headers

Hello,
Can somebody give me a clue as to what this cgi error message means?
premature end of script headers: /var/www/cgi-bin/of­fice.cgi

Thank You
Richard Verdugo
___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs



___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Barry Hemphill 31 May 2002 22:13:53 permanent link ]
 rverdugo@huntington.­org wrote:>
Can somebody give me a clue as to what this cgi error message means? > premature end of script headers: /var/www/cgi-bin/of­fice.cgi>
Generally you need to provide a lot more information before there is any
realistic chance of people on the list helping you. We don't know what the
application is, what OS you're using, what web server, what version of perl,
whether you wrote office.cgi yourself or it's a canned script, and so on and
so on.

Does office.cgi even work from the command line?
Have you tried any kind of debugging?

People are usually only willing to help those who at least try to help
themselves.

Barry

----
Barry Hemphill - Course Developer / Instructor
Tel: (508) 303-4011 Educational Services
Fax: (508) 486-4555 Concord Communications, Inc.,
bhemphill@concord.c­om 600 Nickerson Road,
http://www.concord.­com Marlboro, MA 01752


"Be very, very careful what you put into that head, because you will never,
ever get it out."
--- Thomas Cardinal Wolsey (1471-1530)


*******************­********************­********************­***********
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
*******************­********************­********************­***********

___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Peter Vogel 31 May 2002 22:36:07 permanent link ]
 It generally means that your script terminated abnormally, before providing
appropriate headers (i.e. content-type) for the httpd/browser to interpret.

-Peter

-----Original Message-----
From: Scott Campbell
To: 'Verdugo, Richard'; activeperl@listserv­.activestate.com
Sent: 5/31/2002 12:07 PM
Subject: RE: Premature end of script headers

We will need to see the script in order to help.
Does the error give a line number?

Scott Campbell
Senior Software Developer
Somix Technologies
(207) 324-8805
http://www.somix.co­m

-----Original Message-----
From: activeperl-admin@li­stserv.ActiveState.c­om
[mailto:activeperl-admin@listserv.ActiveState.com] On Behalf Of Verdugo,
Richard
Sent: Friday, May 31, 2002 2:56 PM
To: activeperl@listserv­.activestate.com
Subject: Premature end of script headers

Hello,
Can somebody give me a clue as to what this cgi error message means?
premature end of script headers: /var/www/cgi-bin/of­fice.cgi

Thank You
Richard Verdugo
___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs



___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs
___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Joe Rioux 3 June 2002 16:54:42 permanent link ]
 I don't know the first thing about CGI, but what does it
have to do with Perl? So in addition to providing as much
information as possible, I'm going to go out on a limb and
also suggest the proper forum as well :)­

-----Original Message-----> From: Hemphill, Barry [mailto:BHemphill@concord.com]> Sent: Friday, May 31, 2002 3:14 PM> To: activeperl@listserv­.activestate.com> Cc: 'Verdugo, Richard'> Subject: RE: Premature end of script headers>
rverdugo@huntington­.org wrote:> >
Can somebody give me a clue as to what this cgi error > message means? > > premature end of script headers: /var/www/cgi-bin/of­fice.cgi> >
Generally you need to provide a lot more information before > there is any> realistic chance of people on the list helping you. We don't > know what the> application is, what OS you're using, what web server, what > version of perl,> whether you wrote office.cgi yourself or it's a canned > script, and so on and> so on.>
Does office.cgi even work from the command line?> Have you tried any kind of debugging?>
People are usually only willing to help those who at least try to help> themselves.>
Barry>
----> Barry Hemphill - Course Developer / Instructor> Tel: (508) 303-4011 Educational Services> Fax: (508) 486-4555 Concord Communications, Inc.,> bhemphill@concord.c­om 600 Nickerson Road,> http://www.concord.­com Marlboro, MA 01752>
"Be very, very careful what you put into that head, because > you will never,> ever get it out."> --- Thomas Cardinal Wolsey (1471-1530)>
*******************­********************­********************­***********> This email and any files transmitted with it are confidential and> intended solely for the use of the individual or entity to whom they> are addressed. If you have received this email in error please notify> the system manager.>
This footnote also confirms that this email message has been swept by> the latest virus scan software available for the presence of computer > viruses.> *******************­********************­********************­***********>
___________________­____________________­________> ActivePerl mailing list> ActivePerl@listserv­.ActiveState.com> To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs>
___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Terry Simons 26 June 2002 07:35:52 permanent link ]
 Make sure that the script is set with the execute bit.

Also... I've never seen the \r used in the Content-type piece... I've
always used \n\n... .might want to try that, though I'm not sure.

- Terry

On Tuesday, June 25, 2002, at 12:24 PM, Qingjuan Gu wrote:
Hi everybody,>
When I brwoser this perl script on the web broswer, it gives error:> Internal Server Error> The server encountered an internal error or misconfiguration and was > unable to complete your request>
In error.log:> [Tue Jun 25 14:20:22 2002] [error] [client 130.91.8.66] Premature end > of script headers: /db4/usr/local/www/­html_files/cgi-bin/mboss.pl>
But other cgi or perl script in the same directory work fine.>
I do not know hwat is wrong with this script, here is this script:> #!/compbio/programs­/perl-5.6.1/bin/perl­5.6.1>
use CGI;> use EMBOSS::GUI;>
my $cgi = new CGI;> print "Content-type: text/html\r\n\r\n";­> init('/compbio/prog­rams/emboss/share/EM­BOSS', > '/compbio/programs/­emboss/bin', > '/db4/usr/local/www­/html_files/html/EMB­OSS', 'http://athena> .wistar.upenn.edu/E­MBOSS', 'http://athena.wist­ar.upenn.edu/cgi-bin­', 0);> for ($cgi->param("_acti­on")) {> /^mmenu/ and do { mmenu($cgi); last; };> /^input/ and do { input($cgi); last; };> /^run/ and do { run($cgi); last; };> /^help/ and do { help($cgi); last; };> /^manual/ and do { manual($cgi); last; };> /^search/ and do { search($cgi); last; };> }> print "\n";> ~> Any idea will be appreciated greatly.>
Grace>
-------------------­--------------------­--------------------­----------> To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org> For additional commands, e-mail: users-help@httpd.ap­ache.org>
Add comment
Robert Andersson 26 June 2002 11:07:34 permanent link ]
 This is a CGI/Perl-problem rather than Apache.
But, anyway, the error says that the script (or cgi-handler) outputs
something else than legal HTTP-headers, and is usually caused if your
program has an error in it. By looking in the error log you should see what
the script did output that caused the error. This is usually a perl error
message, which you can use to fix your code. If that is not helping, it's
just ordinarily debuging; strip everything but the print "Content-type:
text/ht..." (and replace "\r\n\r\n" with simply "\n\n"), and then add the
use statements, then the new statement, etc. untill you find the error.

Regards,
Robert Andersson

----- Original Message -----
From: "Qingjuan Gu" <qingjuan@wistar.up­enn.edu>
To: <users@httpd.apache­.org>
Sent: Tuesday, June 25, 2002 8:24 PM
Subject: Premature end of script headers

Hi everybody,>
When I brwoser this perl script on the web broswer, it gives error:> Internal Server Error> The server encountered an internal error or misconfiguration and was
unable to complete your request>
In error.log:> [Tue Jun 25 14:20:22 2002] [error] [client 130.91.8.66] Premature end of
script headers: /db4/usr/local/www/­html_files/cgi-bin/mboss.pl>
But other cgi or perl script in the same directory work fine.>
I do not know hwat is wrong with this script, here is this script:> #!/compbio/programs­/perl-5.6.1/bin/perl­5.6.1>
use CGI;> use EMBOSS::GUI;>
my $cgi = new CGI;> print "Content-type: text/html\r\n\r\n";­> init('/compbio/prog­rams/emboss/share/EM­BOSS',
'/compbio/programs/­emboss/bin', '/db4/usr/local/www­/html_files/html/EMB­OSS',
'http://athena> .wistar.upenn.edu/E­MBOSS', 'http://athena.wist­ar.upenn.edu/cgi-bin­', 0);> for ($cgi->param("_acti­on")) {> /^mmenu/ and do { mmenu($cgi); last; };> /^input/ and do { input($cgi); last; };> /^run/ and do { run($cgi); last; };> /^help/ and do { help($cgi); last; };> /^manual/ and do { manual($cgi); last; };> /^search/ and do { search($cgi); last; };> }> print "\n";> ~> Any idea will be appreciated greatly.>
Grace>
-------------------­--------------------­--------------------­----------> To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org> For additional commands, e-mail: users-help@httpd.ap­ache.org>
Add comment
Chan Raymond 20 August 2002 15:31:54 permanent link ]
 Hi,
I am using Apache 2.0.3.9.I have a .cgi file.When I
execute it, it state thee errors....
Server error!>>Error message: >>Premature end of script headers: guestbook.cgi

I have attached the .cgi file

Please help

Best Regards
Raymond

___________________­____________________­__________________
ÅμƽX¬Û¨C±i¥u«Y $1.2¡I
Print your digital photos for $1.2 each only
http://photos.yahoo­.com.hk

#!d:\perl\bin\perl.­exe -w
# Setup Begin

$cgiurl = "http://icondr.home­ip.net:70/cgi-user/g­uestbook1/guestbook.­cgi"; #URL of guestbook.cgi
$mainurl = "http://icondor.hom­eip.net:70/guestbook­1/guestbook.htm"; #URL of guestbook.htm
$mainfile = "http://icondor.hom­eip.net:70/guestbook­1/guestbook.htm"; #path of guestbook.htm
$numberfile = "http://icondor.hom­eip.net:70/guestbook­1/guestbook.txt"; #path of guestbook.txt
$ledgifurl = "http://icondor.hom­eip.net:70/guestbook­1/led.gif"; #URL of led.gif
$allow_html = 0; #allows Html,0=NO,1=YES
$time_miss = 0; #+1=add 1 hour,-1=take off 1 hour
$title = "[Guestbook]"; #TITLE
$manage[0] = "conodr¡ü70874879";­ #ID and PASSWORD of control mode

$bgcolor = "eeeecc"; # color of background
$text = "000000"; # color of text
#End of Setup
###################­####
print "Content-type: text/html\n";
print "Pragma:no-cache\n\­n";

{
local ($oldbar) = $|;
$cfh = select (STDOUT);
$| = 1;
#
# print your HTTP headers here
#
$| = $oldbar;
select ($cfh);
}
e"t_data;
&set_var;

if ($job eq "add") {
e"t_new_number;
&write_main(add);
&return_succ(add);
}
elsif ($job eq "manage") {
&return_request(man­age);
}
elsif ($job eq "managedel") {
&write_main(managed­el);
&return_succ(manage­del);
}

###################­####
sub get_data {
@querys = split(/&/, $ENV{'QUERY_STRING'­});
foreach $query (@querys) {
($name, $value) = split(/=/, $query);
$FORM{$name} = $value;
}

read(STDIN, $buffer, $ENV{'CONTENT_LENGT­H'});
@pairs = split(/&/, $buffer);

foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);

# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g­;

if ($allow_html != 1) {
$value =~ s/<([^>]|\n)*>//g;
$value =~ s/<([^>]|\n)*//g;
}
else {
unless ($name eq 'says') {
$value =~ s/<([^>]|\n)*>//g;
$value =~ s/<([^>]|\n)*//g;
}
}
$FORM{$name} = $value;
}
}

###############
sub set_var {
if ($FORM{'job'}) {
$job = "$FORM{'job'}";
&checkempty($job,"N­O COMMAND");
}
else {
&error("NO COMMAND");
}

if ($FORM{'id'}) {
$id = "$FORM{'id'}";
&checkempty($id,"NO­ ID");
}
elsif ($job =~ /manage/) {
&error("NO ID");
}

if ($FORM{'password'})­ {
$password = "$FORM{'password'}"­;
&checkempty($passwo­rd,"NO Password");
}
elsif ($job =~ /manage/) {
&error("NO Password");
}

if ($job =~ /manage/) {
$temp=1;
foreach $manage_line (@manage) {
if ($manage_line eq "$id¡ü$password") {
$temp=2;
last;
}
}
if ($temp ne "2") {
&error("ERROR");
}
}

if ($FORM{'username'})­ {
$username = "$FORM{'username'}"­;
$username =~ s/\n//g;
$username =~ s/"//g;
$username =~ s/<//g;
$username =~ s/>//g;
$username =~ s/\&//g;
$username =~ s/¡ü//g;
&checkempty($userna­me,"Please type your name");
}
elsif ($job eq "add") {
&error("Please type your name");
}

if ($FORM{'usermail'} =~ /.*\@.*\..*/) {
$usermail = "$FORM{'usermail'}"­;
$usermail =~ s/¡ü//g;
$usermail =~ s/\n//g;
}

if ($FORM{'userurl'} =~ /.*\:.*\..*/ ) {
$userurl = "$FORM{'userurl'}";­
$userurl =~ s/¡ü//g;
$userurl =~ s/\n//g;
}

if ($FORM{'says'}) {
$says = "$FORM{'says'}";
$says =~ s/\n/<br>/g;
&checkempty($says,"­NO MESSAGE");
}
elsif ($job eq "add") {
&error("NO MESSAGE");
}

if ($FORM{'number'}) {
$number = "$FORM{'number'}";
&checkempty($number­,"NO NUMBER");
}
elsif ($job eq "managedel") {
&error("NO NUMBER");
}

($nsec,$nmin,$nhour­,$nday,$nmon,$nyear,­$wday,$yday,$isdst) = localtime(time+($ti­me_miss*3600));
$nmon++;
if ($nmon<10) {$nmon="0$nmon";}
if ($nday<10) {$nday="0$nday";}
if ($nhour<10){$nhour=­"0$nhour";}
if ($nmin<10) {$nmin="0$nmin";}
if ($nsec<10) {$nsec="0$nsec";}
$normal_time = "$nyear/$nmon/$nday­($nhour\:$­nmin)";
$userhost = $ENV{'REMOTE_HOST'}­;
}
###################­##
sub get_new_number {
open(MAIN,"$numberf­ile") || die $!;
$number = <MAIN>;
close(MAIN);

$number=int($number­)+1;

open(MAIN,">$number­file") || die $!;
print MAIN "$number";
close(MAIN);
}
###################­##
sub write_main {
$write_main_subject­ = $_[0];

open(MAIN,"$mainfil­e") || die $!;
@main = <MAIN>;
close(MAIN);

if ($write_main_subjec­t eq "add") {

open(MAIN,">$mainfi­le") || die $!;
foreach $main_line (@main) {
if ($main_line =~ /<!--begin-->/) {
print MAIN "<!--begin-->\n";
print MAIN "<!--number=$number­--head-->\n";
print MAIN "<font size=3>";
print MAIN "<img src=$ledgifurl>$say­s<br>";
print MAIN "</font>\n";
print MAIN "<font size=2><i><b>";
print MAIN "By $username ";
if ($usermail) {
print MAIN "E-mail\:<a href=\"mailto:$­user­mail\">$usermail</a>­";
}
print MAIN "<br>";
if ($userurl){
print MAIN "Url\:<a href=\"$userurl\" target=\"windows\">­$userurl</a><br>";
}
print MAIN "</b></i></font>";
print MAIN "<font size=1><i>At\:$­norm­al_time Host\:$­userhost</i>­</font>";
print MAIN "<hr width=400 align=left size=1>\n";
print MAIN "<!--number=$number­--end-->\n";
}
else {
print MAIN "$main_line";
}
}
close(MAIN);

}
elsif ($write_main_subjec­t eq "managedel") {
$temp=1;
open(MAIN,">$mainfi­le") || die $!;
foreach $main_line (@main) {
if ($main_line =~ /<!--number=$number­--head-->/) {
$temp=2;
print MAIN "";
}
elsif ($main_line =~ /<!--number=$number­--end-->/) {
$temp=3;
print MAIN "";
}
elsif ($temp==2) {
print MAIN "";
}
else {
print MAIN "$main_line";
}
}
close(MAIN);
}

}


############
sub return_request {
$return_request_sub­ject = $_[0];

open(MAIN,"$mainfil­e") || die $!;
@main = <MAIN>;
close(MAIN);

if ($return_request_su­bject eq "manage") {
foreach $main_line (@main) {
if ($main_line =~ /<!--number=(.*)--h­ead-->/) {
$number=$1;
print "<a href=$cgiurl?job=ma­nagedel&id=$id&passw­ord=$password&number­=$number>del</a>$mai­n_line";
}
else {
print "$main_line";
}
}
}

}

############
sub return_succ {
$return_succ_subjec­t = $_[0];
print "<html><head><title­>$title</title>\n";
if ($return_succ_subje­ct eq "managedel") {
print "<META HTTP-EQUIV=REFRESH CONTENT=\"3;URL=$cg­iurl?job=manage&id=$­id&password=$passwor­d\"></head>\n";
}
else {
print "<META HTTP-EQUIV=REFRESH CONTENT=\"3;URL=$ma­inurl\"></head>\n";
}

print "<center>\n";
if ($return_succ_subje­ct eq "add") {
print "<h2>Login success!</h2>\n";
}
if ($return_succ_subje­ct eq "managedel") {
print "<h2>Delete success!</h2>\n";
}
print "<hr width=400 size=1 align=center>\n";
print "<a href=\"$mainurl\">B­ack to $title</a>\n";
print "</center></body></­html>\n";
}

########
sub checkempty {
$checkvalue = $_[0];
$checkerror = $_[1];
$checkvalue =~ s/<br>//g;
$checkvalue =~ s/\n//g;
$checkvalue =~ s/ //g;

if ($checkvalue eq "") {
&error($checkerror)­;
}

}

########
sub error {
$error_subject = $_[0];
print "<html><head><title­>$wwwboardtitle error</title></head­>\n";
print "<body bgcolor=$bgcolor text=$text>\n";
print "<center><h2>\n";
print "ERROR¡G$error_subj­ect\n";
print "</h2></center></bo­dy></html>\n";
exit 0;
}





















-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org
Add comment
Robert D. Nelson 20 August 2002 17:52:19 permanent link ]
 Raymond:

The error you describe happens when the script attempts to output via CGI
but sends it without header information to tell the server what to do with
it. The most common reason for this is when the programmer forgets to add
a...

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

...line to the top of HTML output.

Either way, this is a programming problem, not an Apache problem.

~ Robert


-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle@swx.com]
Sent: Tuesday, August 20, 2002 7:37 AM
To: users@httpd.apache.­org
Subject: RE: Premature end of script headers???


Easy. Your program didn't work.

Do:

- try from the command line, does it work?
- does it output a valid CGI header?
- enable ScriptLog to trap STDERR

Rgds,

Owen Boyle.
-----Original Message----->From: Chan Raymond [mailto:cwraymond2000@yahoo.com.hk]>Sent: Dienstag, 20. August 2002 14:32>To: users@httpd.apache.­org>Subject: Premature end of script headers???>
Hi,>I am using Apache 2.0.3.9.I have a .cgi file.When I>execute it, it state thee errors....>
Server error!>>>Error message: >>>Premature end of script headers: guestbook.cgi >
I have attached the .cgi file>
Please help>
Best Regards>Raymond>
__________________­____________________­___________________>­???????? $1.2!>Print your digital photos for $1.2 each only>http://photos.­yahoo.com.hk>

-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org

-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment
Dirk-Willem van Gulik 20 August 2002 18:16:48 permanent link ]
 

On Tue, 20 Aug 2002, Nelson, Robert D. wrote:
The error you describe happens when the script attempts to output via CGI> but sends it without header information to tell the server what to do with> it. The most common reason for this is when the programmer forgets to add> a...>
print "Content-type: text/html\n\n";>
...line to the top of HTML output.>
Either way, this is a programming problem, not an Apache problem.

Or somehow some other output manages to be send out before the above. what
can help during troubleshooting is to put

$|=1;
print "Content-type: text/plain\n\n";

as the very first two lines of your perl script. This may help you debug
what is actually written by your script. A common culprit is an unexpected
error which writes something before the script has written its proper
content-type string.

Dw


-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org


Add comment


Chan Raymond 21 August 2002 06:40:00 permanent link ]
 I have added that two lines on my .cgi file

but also state the error message

Please help.....
I hv attached the .cgi file

Please check....
THX

Raymond Chan

--- Dirk-Willem van Gulik <dirkx@webweaving.o­rg>
ªº¶l¥ó¤º®e¡G> > Somehow your script outputs something *before* it> gets to these print> statements. Just put on the first two lines of the> script>
$|=1;print "Content-type: text/plain\r\n\r\n"­;>
to find out -what- is being printed. Or move the> print's below up to the> top.>
Dw.>
On Wed, 21 Aug 2002, [big5] Chan Raymond wrote:>
Sorry...I am a idiot.....> >
I don't know what u are talkin' about. Can you> explain> > it to me in detail.> >
What is http header actually....> >
I have found ....> >
print "Content-type: text/html\n";> > print "Pragma:no-cache\n\­n";> >
{> > local ($oldbar) = $|;> > $cfh = select (STDOUT);> > $| = 1;> > #> > # print your HTTP headers here> > #> > $| = $oldbar;> > select ($cfh);> > }> > .....> > in the guestbook.cgi.> > What is it means?> >
Can anyone also tell me howto test the .cgi file> in> > command line.> >
Thank you very much and Best Regards> > Raymond> >
--- Dirk-Willem van Gulik <dirkx@webweaving.o­rg>> > ªº¶l¥ó¤º®e¡G>> > >
On Tue, 20 Aug 2002, Nelson, Robert D. wrote:> > >
The error you describe happens when the script> > > attempts to output via CGI> > > > but sends it without header information to> tell> > > the server what to do with> > > > it. The most common reason for this is when> the> > > programmer forgets to add> > > > a...> > > >
print "Content-type: text/html\n\n";> > > >
...line to the top of HTML output.> > > >
Either way, this is a programming problem, not> an> > > Apache problem.> > >
Or somehow some other output manages to be send> out> > > before the above. what> > > can help during troubleshooting is to put> > >
$|=1;> > > print "Content-type: text/plain\n\n";> > >
as the very first two lines of your perl script.> > > This may help you debug> > > what is actually written by your script. A> common> > > culprit is an unexpected> > > error which writes something before the script> has> > > written its proper> > > content-type string.> > >
-------------------­--------------------­--------------------­----------> > > The official User-To-User support forum of the> > > Apache HTTP Server Project.> > > See <URL:http://httpd.a­pache.org/userslist.­html>> for> > > more info.> > > To unsubscribe, e-mail:> > > users-unsubscribe@h­ttpd.apache.org> > > " from the digest:> > > users-digest-unsubs­cribe@httpd.apache.o­rg> > > For additional commands, e-mail:> > > users-help@httpd.ap­ache.org> > >
___________________­____________________­__________________> > ÅμƽX¬Û¨C±i¥u«Y $1.2¡I> > Print your digital photos for $1.2 each only> > http://photos.yahoo­.com.hk> >
-------------------­--------------------­--------------------­----------> > The official User-To-User support forum of the> Apache HTTP Server Project.> > See <URL:http://httpd.a­pache.org/userslist.­html>> for more info.> > To unsubscribe, e-mail:> users-unsubscribe@h­ttpd.apache.org> > " from the digest:> users-digest-unsubs­cribe@httpd.apache.o­rg> > For additional commands, e-mail:> users-help@httpd.ap­ache.org> >
-------------------­--------------------­--------------------­----------> The official User-To-User support forum of the> Apache HTTP Server Project.> See <URL:http://httpd.a­pache.org/userslist.­html> for> more info.> To unsubscribe, e-mail:> users-unsubscribe@h­ttpd.apache.org> " from the digest:> users-digest-unsubs­cribe@httpd.apache.o­rg> For additional commands, e-mail:> users-help@httpd.ap­ache.org>

___________________­____________________­__________________
ÅμƽX¬Û¨C±i¥u«Y $1.2¡I
Print your digital photos for $1.2 each only
http://photos.yahoo­.com.hk

#!d:\perl\bin\perl.­exe -w
# Setup Begin
$|=1;
print "Content-type: text/plain\r\n\r\n"­;

$cgiurl = "http://icondr.home­ip.net:70/cgi-user/g­uestbook1/guestbook.­cgi"; #URL of guestbook.cgi
$mainurl = "http://icondor.hom­eip.net:70/guestbook­1/guestbook.htm"; #URL of guestbook.htm
$mainfile = "http://icondor.hom­eip.net:70/guestbook­1/guestbook.htm"; #path of guestbook.htm
$numberfile = "http://icondor.hom­eip.net:70/guestbook­1/guestbook.txt"; #path of guestbook.txt
$ledgifurl = "http://icondor.hom­eip.net:70/guestbook­1/led.gif"; #URL of led.gif
$allow_html = 0; #allows Html,0=NO,1=YES
$time_miss = 0; #+1=add 1 hour,-1=take off 1 hour
$title = "[Guestbook]"; #TITLE
$manage[0] = "conodr¡ü70874879";­ #ID and PASSWORD of control mode

$bgcolor = "eeeecc"; # color of background
$text = "000000"; # color of text
#End of Setup
###################­####
print "Content-type: text/html\n";
print "Pragma:no-cache\n\­n";

{
local ($oldbar) = $|;
$cfh = select (STDOUT);
$| = 1;
#
# print your HTTP headers here
#
$| = $oldbar;
select ($cfh);
}
e"t_data;
&set_var;

if ($job eq "add") {
e"t_new_number;
&write_main(add);
&return_succ(add);
}
elsif ($job eq "manage") {
&return_request(man­age);
}
elsif ($job eq "managedel") {
&write_main(managed­el);
&return_succ(manage­del);
}

###################­####
sub get_data {
@querys = split(/&/, $ENV{'QUERY_STRING'­});
foreach $query (@querys) {
($name, $value) = split(/=/, $query);
$FORM{$name} = $value;
}

read(STDIN, $buffer, $ENV{'CONTENT_LENGT­H'});
@pairs = split(/&/, $buffer);

foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);

# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g­;

if ($allow_html != 1) {
$value =~ s/<([^>]|\n)*>//g;
$value =~ s/<([^>]|\n)*//g;
}
else {
unless ($name eq 'says') {
$value =~ s/<([^>]|\n)*>//g;
$value =~ s/<([^>]|\n)*//g;
}
}
$FORM{$name} = $value;
}
}

###############
sub set_var {
if ($FORM{'job'}) {
$job = "$FORM{'job'}";
&checkempty($job,"N­O COMMAND");
}
else {
&error("NO COMMAND");
}

if ($FORM{'id'}) {
$id = "$FORM{'id'}";
&checkempty($id,"NO­ ID");
}
elsif ($job =~ /manage/) {
&error("NO ID");
}

if ($FORM{'password'})­ {
$password = "$FORM{'password'}"­;
&checkempty($passwo­rd,"NO Password");
}
elsif ($job =~ /manage/) {
&error("NO Password");
}

if ($job =~ /manage/) {
$temp=1;
foreach $manage_line (@manage) {
if ($manage_line eq "$id¡ü$password") {
$temp=2;
last;
}
}
if ($temp ne "2") {
&error("ERROR");
}
}

if ($FORM{'username'})­ {
$username = "$FORM{'username'}"­;
$username =~ s/\n//g;
$username =~ s/"//g;
$username =~ s/<//g;
$username =~ s/>//g;
$username =~ s/\&//g;
$username =~ s/¡ü//g;
&checkempty($userna­me,"Please type your name");
}
elsif ($job eq "add") {
&error("Please type your name");
}

if ($FORM{'usermail'} =~ /.*\@.*\..*/) {
$usermail = "$FORM{'usermail'}"­;
$usermail =~ s/¡ü//g;
$usermail =~ s/\n//g;
}

if ($FORM{'userurl'} =~ /.*\:.*\..*/ ) {
$userurl = "$FORM{'userurl'}";­
$userurl =~ s/¡ü//g;
$userurl =~ s/\n//g;
}

if ($FORM{'says'}) {
$says = "$FORM{'says'}";
$says =~ s/\n/<br>/g;
&checkempty($says,"­NO MESSAGE");
}
elsif ($job eq "add") {
&error("NO MESSAGE");
}

if ($FORM{'number'}) {
$number = "$FORM{'number'}";
&checkempty($number­,"NO NUMBER");
}
elsif ($job eq "managedel") {
&error("NO NUMBER");
}

($nsec,$nmin,$nhour­,$nday,$nmon,$nyear,­$wday,$yday,$isdst) = localtime(time+($ti­me_miss*3600));
$nmon++;
if ($nmon<10) {$nmon="0$nmon";}
if ($nday<10) {$nday="0$nday";}
if ($nhour<10){$nhour=­"0$nhour";}
if ($nmin<10) {$nmin="0$nmin";}
if ($nsec<10) {$nsec="0$nsec";}
$normal_time = "$nyear/$nmon/$nday­($nhour\:$­nmin)";
$userhost = $ENV{'REMOTE_HOST'}­;
}
###################­##
sub get_new_number {
open(MAIN,"$numberf­ile") || die $!;
$number = <MAIN>;
close(MAIN);

$number=int($number­)+1;

open(MAIN,">$number­file") || die $!;
print MAIN "$number";
close(MAIN);
}
###################­##
sub write_main {
$write_main_subject­ = $_[0];

open(MAIN,"$mainfil­e") || die $!;
@main = <MAIN>;
close(MAIN);

if ($write_main_subjec­t eq "add") {

open(MAIN,">$mainfi­le") || die $!;
foreach $main_line (@main) {
if ($main_line =~ /<!--begin-->/) {
print MAIN "<!--begin-->\n";
print MAIN "<!--number=$number­--head-->\n";
print MAIN "<font size=3>";
print MAIN "<img src=$ledgifurl>$say­s<br>";
print MAIN "</font>\n";
print MAIN "<font size=2><i><b>";
print MAIN "By $username ";
if ($usermail) {
print MAIN "E-mail\:<a href=\"mailto:$­user­mail\">$usermail</a>­";
}
print MAIN "<br>";
if ($userurl){
print MAIN "Url\:<a href=\"$userurl\" target=\"windows\">­$userurl</a><br>";
}
print MAIN "</b></i></font>";
print MAIN "<font size=1><i>At\:$­norm­al_time Host\:$­userhost</i>­</font>";
print MAIN "<hr width=400 align=left size=1>\n";
print MAIN "<!--number=$number­--end-->\n";
}
else {
print MAIN "$main_line";
}
}
close(MAIN);

}
elsif ($write_main_subjec­t eq "managedel") {
$temp=1;
open(MAIN,">$mainfi­le") || die $!;
foreach $main_line (@main) {
if ($main_line =~ /<!--number=$number­--head-->/) {
$temp=2;
print MAIN "";
}
elsif ($main_line =~ /<!--number=$number­--end-->/) {
$temp=3;
print MAIN "";
}
elsif ($temp==2) {
print MAIN "";
}
else {
print MAIN "$main_line";
}
}
close(MAIN);
}

}


############
sub return_request {
$return_request_sub­ject = $_[0];

open(MAIN,"$mainfil­e") || die $!;
@main = <MAIN>;
close(MAIN);

if ($return_request_su­bject eq "manage") {
foreach $main_line (@main) {
if ($main_line =~ /<!--number=(.*)--h­ead-->/) {
$number=$1;
print "<a href=$cgiurl?job=ma­nagedel&id=$id&passw­ord=$password&number­=$number>del</a>$mai­n_line";
}
else {
print "$main_line";
}
}
}

}

############
sub return_succ {
$return_succ_subjec­t = $_[0];
print "<html><head><title­>$title</title>\n";
if ($return_succ_subje­ct eq "managedel") {
print "<META HTTP-EQUIV=REFRESH CONTENT=\"3;URL=$cg­iurl?job=manage&id=$­id&password=$passwor­d\"></head>\n";
}
else {
print "<META HTTP-EQUIV=REFRESH CONTENT=\"3;URL=$ma­inurl\"></head>\n";
}

print "<center>\n";
if ($return_succ_subje­ct eq "add") {
print "<h2>Login success!</h2>\n";
}
if ($return_succ_subje­ct eq "managedel") {
print "<h2>Delete success!</h2>\n";
}
print "<hr width=400 size=1 align=center>\n";
print "<a href=\"$mainurl\">B­ack to $title</a>\n";
print "</center></body></­html>\n";
}

########
sub checkempty {
$checkvalue = $_[0];
$checkerror = $_[1];
$checkvalue =~ s/<br>//g;
$checkvalue =~ s/\n//g;
$checkvalue =~ s/ //g;

if ($checkvalue eq "") {
&error($checkerror)­;
}

}

########
sub error {
$error_subject = $_[0];
print "<html><head><title­>$wwwboardtitle error</title></head­>\n";
print "<body bgcolor=$bgcolor text=$text>\n";
print "<center><h2>\n";
print "ERROR¡G$error_subj­ect\n";
print "</h2></center></bo­dy></html>\n";
exit 0;
}





















-------------------­--------------------­--------------------­----------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.a­pache.org/userslist.­html> for more info.
To unsubscribe, e-mail: users-unsubscribe@h­ttpd.apache.org
" from the digest: users-digest-unsubs­cribe@httpd.apache.o­rg
For additional commands, e-mail: users-help@httpd.ap­ache.org
Add comment
Prachi Shah 5 October 2002 00:31:37 permanent link ]
 Hi all,

I had to reinstall windows 2000 on my machine for some
funny reasons and hence am now setting up my webserver
and other things. I installed Apache 1.3.27 and that
works fine. I then downloaded PHP4 and was trying to
configure it to the Apache web server. I followed all
instructions in the instalation guide, but still get
this error when I try to run any php scripts from the
browser:
"Premature end of script headers: c:/php/php.exe"

Any idea why this would happen? And how to correct it?

thanks,
Prachi.



___________________­____________________­___________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.co­m

--
PHP Windows Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment


Adam Voigt 18 December 2002 21:13:23 permanent link ]
 
Add comment
Alexey Lysenkov 19 December 2002 02:53:32 permanent link ]
 Guys? The support guy says that my php-script brings his php interpreter to
crash. I am astonished (wow-what a powerful man I am :)­ ) - no, but really,
it doesn't crash MY server? He also said, it happens just right after the
file is being asked for, that is, as I suspect, somewhere in the first lines
of my php code.
I run 4.2.0, he runs 4.0.5 . Both Safe-mode "on", both, as I suspect, on
Windows, mySQL as well.
What could in these first lines of the code, which follows, bring his
machine to death? Please, someone - it's so urgent, really...


<?php
session_start();
$parseOkay = false;
$varsOkay = false;
$cookOkay = false;

$coo = time()."-".session_­id();

$hersteller = array (".....");
$herstellerNr = array (2,1,4,3,5,6);

$frage5 = array("......");
$frage5bedeutung = array("....");

$frage1warn = false;
$php_q1 = "0";

$frage2warn = false;
$php_q2 = "0";

$frage3warn = false;

$frage4warn = false;

$frage5warn = false;
$frage5_count = 0;

$php_q6 = "0";

$php_q7 = "0";

$php_q8 = "";

$php_q9 = "";

ob_start();
if(isset($HTTP_COOK­IE_VARS["foo"])) {
$coo = $HTTP_COOKIE_VARS["foo"];
$cookOkay = true;
}

if(isset($HTTP_GET_­VARS["parse"])){
require("uservars.p­hp"); // BROWSER, IP, DATE;
require("resetvars.­php");
$parseOkay = true;
}
ob_end_flush();
?>

thanks.

Almost dead, but happy, that the thing works at least on ONE machine,
Alex



--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment


Dave 19 December 2002 04:10:12 permanent link ]
 
Guys? The support guy says that my php-script brings his php interpreter to>crash. I am astonished (wow-what a powerful man I am :)­ ) - no, but really,>it doesn't crash MY server? He also said, it happens just right after the>file is being asked for, that is, as I suspect, somewhere in the first lines>of my php code.

Interesting...
I run 4.2.0, he runs 4.0.5 . Both Safe-mode "on", both, as I suspect, on>Windows, mySQL as well.

you suspect he is on winodws or know he is? (No experience with the windows
platform and PHP myself)
What could in these first lines of the code, which follows, bring his>machine to death? Please, someone - it's so urgent, really...>
<?php
^^^^^^
is there a space above this line? For perl etc cgi scripts, having a space
above the hash causes this error... might be something to check especially when
you are expecting to set cookie, session and other header related stuff, maybe
he is running as a CGI or something and causing this.

Barring that, try eliminating/comment­ing out chunks of code until you get the
page to at least load in some state, then start putting back untlil you narrow
down where the problem is. Perhaps increase your error reporting... stabbing
here.

Dave



--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Dominik Luyten 14 January 2003 00:03:34 permanent link ]
 Hi all,

I need to switch from Active Perl 5.6 to 5.8 on Windows as dbd-mysql
only supports on 5.8

So I uninstalled 5.6 and installed 5.8 with dbi and dbd-mysql modules. I
changed nothing else, even used the same directory as before for the
Perl installation, but i get "Premature end of script headers" now.

I am sure it is some configuration "feature" of 5.8, as everything works
fine with 5.6

Any ideas anyone?

Thx,

Dominik Luyten


___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Basil Daoust 14 January 2003 00:16:44 permanent link ]
 I don't know what your problem is but 5.8 and 5.6.1 do behave differently.
As I tried to install 5.8 and it broke my script I was working on.
So try checking the change log text, it might shine some light on your
problem.

Basil Daoust
Automation Services


___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Cameron Dorey 14 January 2003 00:18:00 permanent link ]
 Dominik Luyten wrote:
Hi all,>
I need to switch from Active Perl 5.6 to 5.8 on Windows as dbd-mysql> only supports on 5.8


I'm using it on 5.6, so you must have made some mistake.

http://www.activest­ate.com/PPMPackages/­zips/6xx-builds-only­/DBD-Mysql.zip

to get your own copy to install it locally.
So I uninstalled 5.6 and installed 5.8 with dbi and dbd-mysql modules. I> changed nothing else, even used the same directory as before for the> Perl installation, but i get "Premature end of script headers" now.>
I am sure it is some configuration "feature" of 5.8, as everything works> fine with 5.6


I thought you said you couldn't even run (whatever program this is) on 5.6?

It sounds like a problem with your webserver to me. Did you try running
your program from a command prompt and seeing what the output was? And
then running a "Hello, World" script through the server?

Cameron

--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.e­du

___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveState.com
To unsubscribe: http://listserv.Act­iveState.com/mailman­/mysubs

Add comment
Dominik Luyten 14 January 2003 00:26:47 permanent link ]
 -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Cameron,

sorry for the error! What I wanted to say was :
"I need to switch from Active Perl 5.6 to 5.8 on Windows as dbd-mysql
only supports TRANSACTIONS on 5.8" (dbd-mysql supports transactions only
from version > 2.xxx which does not seem to work with 5.6, i.e. I did
not happen to find a runnable version of it)

It runs well on 5.6, but without transaction support, and does not run
on 5.8 at all.



Cameron Dorey wrote:
| Dominik Luyten wrote:
|
|> Hi all,
|>
|> I need to switch from Active Perl 5.6 to 5.8 on Windows as dbd-mysql
|> only supports on 5.8
|
|
|
| I'm using it on 5.6, so you must have made some mistake.
|
| http://www.activest­ate.com/PPMPackages/­zips/6xx-builds-only­/DBD-Mysql.zip
|
| to get your own copy to install it locally.
|
|>
|> So I uninstalled 5.6 and installed 5.8 with dbi and dbd-mysql modules. I
|> changed nothing else, even used the same directory as before for the
|> Perl installation, but i get "Premature end of script headers" now.
|>
|> I am sure it is some configuration "feature" of 5.8, as everything works
|> fine with 5.6
|
|
|
| I thought you said you couldn't even run (whatever program this is) on
5.6?
|
| It sounds like a problem with your webserver to me. Did you try running
| your program from a command prompt and seeing what the output was? And
| then running a "Hello, World" script through the server?
|
| Cameron
|

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
Comment: Using PGP with Mozilla - http://enigmail.moz­dev.org

iQA/AwUBPiMhBll+tyv­l55B8EQIRuQCgtDELwxC­y9+Ut2Iu4IQm6PVNGDsA­AoOeU
OPTV6A8cSbFBvtLOLkS­apyBM
=kRsb
-----END PGP SIGNATURE-----

___________________­____________________­________
ActivePerl mailing list
ActivePerl@listserv­.ActiveS