CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl

 



digioleg54
User

May 2, 2017, 9:52 AM

Post #1 of 6 (1011 views)
Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl Can't Post

when I run the test script and connection closed

Code
use DBI; 
use DBD::Oracle;
use Spreadsheet::ParseExcel;
use File::Basename;
use strict;
use warnings;
my($lib_path,$data_path);
BEGIN{
$lib_path=$ENV{'DWEB_SITE_PATH'};
$data_path=$ENV{'DWEB_SITE_CGI_DATADIR'};
}
use lib $lib_path.'/lib/web';
require 'GetDates.pl';
print "Content-type: text/html\n\n";
require "dteacl_b.pl";
my $ORACLEHOME = $ENV{'ORACLE_HOME'};
my $this_dbh = &db_connect({'DSN'=> 'NYFISSAD'});


my $sql=(q{SELECT TO_CHAR((parameter_date),'YYYYMMDD') FROM dte_parameter where parameter_name = 'MONITOR_DATE'});
my $this_sth = $this_dbh->prepare($sql);

$this_sth->execute();

while (my $process_date = $this_sth->fetchrow_array) {
print "Content-type: text/plain\n\n DTE PROCESSING DATE IS $process_date\n";
}
&close_and_exit(\$this_dbh);

in error log I get a message:

Code
Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl


What it means ?

Thanks


FishMonger
Veteran / Moderator

May 2, 2017, 10:07 AM

Post #2 of 6 (1010 views)
Re: [digioleg54] Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl [In reply to] Can't Post

It means that the script generated output prior to outputting the html header.


digioleg54
User

May 2, 2017, 10:21 AM

Post #3 of 6 (1007 views)
Re: [FishMonger] Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl [In reply to] Can't Post


Code

Code
#!/usr/bin/dwebenv perl 

#use lib "/vhosts/dw18637/lib/web/";

use DBI;
use DBD::Oracle;
use Spreadsheet::ParseExcel;
use File::Basename;
use strict;
use warnings;

my($lib_path,$data_path);
BEGIN{
$lib_path=$ENV{'DWEB_SITE_PATH'};
$data_path=$ENV{'DWEB_SITE_CGI_DATADIR'};
}
use lib $lib_path.'/lib/web';
print "Content-type: text/html\n\n";
require "dteacl_b.pl";
my $ORACLEHOME = $ENV{'ORACLE_HOME'};


my $this_dbh = &db_connect({'DSN'=> 'NYFISWAD'})

my $sql=(q{SELECT TO_CHAR((parameter_date),'YYYYMMDD') FROM dte_parameter where parameter_name = 'MONITOR_DATE'});
my $this_sth = $this_dbh->prepare($sql);

$this_sth->execute();

while (my $process_date = $this_sth->fetchrow_array) {
print "Content-type: text/html\n\n";
print "DTE PROCESSING DATE IS $process_date\n";
}&close_and_exit(\$this_dbh);


Now I have them twice, but the same error


FishMonger
Veteran / Moderator

May 2, 2017, 11:25 AM

Post #4 of 6 (1004 views)
Re: [digioleg54] Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl [In reply to] Can't Post

Why are you printing the html header twice?

Remove the one inside the while loop.

Add this use statement before the other ones.

Code
use CGI::Carp qw(fatalsToBrowser);



digioleg54
User

May 2, 2017, 11:37 AM

Post #5 of 6 (999 views)
Re: [FishMonger] Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl [In reply to] Can't Post

I added


Code
Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl


May be the problem is that I don't have some modules?


digioleg54
User

May 2, 2017, 12:36 PM

Post #6 of 6 (994 views)
Re: [FishMonger] Premature end of script headers: php-5.5.38, referer: https://staging.int1.dev.fiss.us.intranet.db.com:652/apps/tests.pl [In reply to] Can't Post

This is solved

Thank you

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives