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]