Hi Dennis, Yeah you noticed the "path-to-perl" discrepancy. That was an
accident, the path-to-perl is
#!/usr/bin/perl
as in the later example. That's not it
 Also, I've tried setting the permissions wide open to 777 and I still get
the same errors. I'll see if I can find anything in the error logs. Thanks!
Luke


----- Original Message -----
From: "Dennis G. Wicks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 7:04 PM
Subject: Re: The very un-useful 'premature end of script headers' error
message


> Greetings;
>
> The two most common problems are an invalid path-to-perl and
> invalid permissions.
>
> First, get on the command line of your server and do a
>
>     which perl
>
> and see where it is on that system. The two examples you have
> quoted have different paths! And they both give the same
> results?
>
> Check the error logs for the server and see what they say.
> They are usually much more informative. They should be
> publically accessible when you are logged on.
>
> There is an apache extension that tightens up security for
> cgi programs. If your server is using this the requirements
> for naming and permissions are slightlky different and very
> picky. Check with your server support people.
>
> Good Luck!
> Dennis
>
>
>
>
>
> On Wed, 26 Mar 2003, Cool Hand Luke wrote:
>
> > Date: Wed, 26 Mar 2003 18:16:22 -0800
> > From: Cool Hand Luke <[EMAIL PROTECTED]>
> > To: Scot Robnett <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > Subject: Re: The very un-useful 'premature end of script headers' error
> >     message
> >
> > Hi Scott,
> >     Thanks for the reply. I tried using your code (I'm a beginner with
the
> > cgi module so please let me know if I made any obvious errors) and it
gave
> > me the same error. Here's what I tried. Also, I've noticed that any time
I
> > use CGI::Carp to try to write errors to the browser it gives me that
same
> > error message. Also, this server is using version 5.003, which I know is
not
> > a good idea because there are problems with output buffering, is this
> > perhaps the source?
> > Thanks,
> > Luke
> >
> > #!/usr/bin/perl -w
> >
> > use strict;
> > use CGI qw(:all);
> > use CGI::Carp qw(fatalsToBrowser); # send errors to browser
> > use SimLib;
> >
> > my $q = new CGI; # initiate new CGI object
> > print $q->header(-type=>'text/html'); # send text/html header to browser
> >
> > (Same as before)
> >
> > ----- Original Message -----
> > From: "Scot Robnett" <[EMAIL PROTECTED]>
> > To: "Cool Hand Luke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 26, 2003 4:13 PM
> > Subject: RE: The very un-useful 'premature end of script headers' error
> > message
> >
> >
> > > A couple of things, and I don't know if this affects Stronghold and
I'm
> > not
> > > sure with which browser(s) you're testing. The first "C" in
"Content-type:
> > > text/html\n\n"; should be capitalized, or better yet, use the CGI
module
> > to
> > > print the header.
> > >
> > > #!/usr/bin/perl -w
> > >
> > > use strict;
> > > use CGI qw(:all);
> > > use CGI::Carp qw(fatalsToBrowser); # send errors to browser
> > > use SimLib;
> > >
> > > my $q = new CGI; # initiate new CGI object
> > > print $q->header(-type=>'text/html'); # send text/html header to
browser
> > >
> > > # etc.
> > >
> > > Also, it's cleaner to use the CGI module or a HERE document to print
your
> > > HTML code, for example:
> > >
> > > print $q->h1('Header');
> > > print $q->p('blah blah blah');
> > >
> > > or
> > >
> > > print <<ENDOFHTML;
> > > <BODY>
> > > <H3>Final Order</H3>
> > > ENDOFHTML
> > >
> > > # and so on...
> > >
> > >
> > > -----
> > > Scot Robnett
> > > inSite Internet Solutions
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Cool Hand Luke [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, March 26, 2003 5:52 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: The very un-useful 'premature end of script headers'
error
> > > message
> > >
> > >
> > > BTW, that's Stronghold/Apache version 1.3.4 if that helps...
> > > Thanks Again
> > > Luke
> > >
> > > ----- Original Message -----
> > > From: "Cool Hand Luke" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 26, 2003 3:41 PM
> > > Subject: The very un-useful 'premature end of script headers' error
> > message
> > >
> > >
> > > > Hi there,
> > > >     I am having the toughest time trying to run perl scripts on this
> > > > Stronghold Apache SSL server I am working with for my company.
> > Everything
> > > I
> > > > run returns the same 'premature end of script headers' error
message.
> > This
> > > > has happened with every script I've run except the most rudimentary
> > "hello
> > > > world" types of scripts. I've made sure the chmod were set to 755
for
> > all
> > > > files and the directory all the files are in to eliminate that as a
> > > concern.
> > > > Is it the buffering? I've also made sure that I was uploading the
files
> > in
> > > > ascii mode and not binary and I've been saving the files using UNIX
> > > > conventions, so I don't think any invisible carriage returns or
anything
> > > of
> > > > the sort have crept in. Here is what I am trying to run this time...
> > > > Any help would be appreciated, cuz I'm stumped.
> > > > Thanks
> > > >
> > > > #!/usr/local/bin/perl -w
> > > >
> > > > print "content-type: text/html\n\n";
> > > >
> > > > use strict;
> > > > use SimLib;
> > > >
> > > > my $loginid = "XXXXXX";
> > > > my $txnkey = "XXXXXX";
> > > >
> > > > my %ENTRY = &SimLib::get_submission;
> > > >
> > > > my $x_amount = $ENTRY{'x_amount'};
> > > >
> > > > if (index($x_amount,'$') == 0){
> > > >  $x_amount = substr($x_amount,1);
> > > > }
> > > >
> > > > my $x_description = $ENTRY{'x_description'};
> > > > my $x_currency_code = "USD";
> > > >
> > > >
> > > > print "<HTML> <HEAD> <TITLE>Order Form</TITLE>\n";
> > > >
> > > > print "</HEAD>\n";
> > > > print "<BODY>\n<H3>Final Order</H3>\n";
> > > >
> > > > print "Description: ".$x_description."  <BR />\n";
> > > > print "Total Amount : ".$x_amount." <BR /><BR />\n";
> > > >
> > > > print "<FORM
> > > > action=\"https://certification.authorize.net/gateway/transact.dll\";
> > > > method=\"POST\">\n";
> > > >
> > > > &SimLib::InsertFP($loginid, $txnkey, $x_amount, $x_currency_code);
> > > >
> > > > print "<input type=\"hidden\" name=\"x_description\" value=\"" .
> > > > $x_description . "\">\n";
> > > > print "<input type=\"hidden\" name=\"x_login\" value=\"" . $loginid
.
> > > > "\">\n";
> > > > print "<input type=\"hidden\" name=\"x_amount\" value=\"" .
$x_amount .
> > > > "\">\n";
> > > > print "<input type=\"hidden\" name=\"x_show_Form\"
> > > > value=\"PAYMENT_FORM\">\n";
> > > > print "<input type=\"hidden\" name=\"x_test_request\"
> > value=\"TRUE\">\n";
> > > > print "<input type=\"submit\" value=\"Accept Order\">\n";
> > > > print "</FORM> </BODY> </HTML>";
> > > >
> > > > 1;
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
>
> --------------------------------------------------------------------------
--
> > ----
> >
> >
> > > --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to