PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: RE: Using sybperl with cgi
Date: Feb 16 1999 7:18PM

>>>>> "Sheree" == Sheree Hemphill  writes:

>> >>>>> "Sheree" == Sheree Hemphill  writes:
>> 
Sheree> Michael, Well, I am getting closer.  I added the sybase
Sheree> environment variable that you mentioned in your response,
Sheree> however I am still getting a generic "Server Error" message on
Sheree> this script.  It doesn't like something about my foreach loop,
Sheree> when I cycle through the results (again, this is identical to
Sheree> the one that works as a shell script).  I'm not sure if I'm
Sheree> having a sybperl problem or a cgi problem at this point.
>>  The script looks fine at first sight.
>> 
>> I suspect that something gets printed to stdout before the print
>> header() call.
>> 
>> Try moving the print header() to before the new Sybase::CTlib.

Sheree> I changed my code to the following, but I get the same error.



>> Also, look in the server's error log for any messages.

Sheree> I did check the error log & it said the following:
Sheree> [16/Feb/1999:13:54:29] failure (15929): for host
Sheree> gene22797.GENE.CWRU.Edu trying to GET
Sheree> /cgi-bin/sah18/biares3.cgi, cgieng_scan_headers reports: the
Sheree> CGI program /var/www/htdocs/helix/cgi-bin/sah18/biares3.cgi
Sheree> did not produce a valid header (name without value: got line
Sheree> "use of uninitialized value at
Sheree> /var/www/htdocs/helix/cgi-bin/sah18/biares3.cgi line 25.")

I *hate* web servers that direct STDERR messages ("use of
uninitialized value") to STDOUT and create this problem!

Short term solution: remove the -w from the !#/usr/local/bin/perl line 
at the top of your script.

The warning comes from perl - there's (probably) a NULL value in your
query result. When you print it out perl (with -w turned on) prints
this warning.

One other thing that you should probably do is to turn off the
buffering of STDOUT. Place this near the top of your script:

select(STDOUT); $| = 1;

Hope this helps.

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com