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: nathan at webdesigngroup dot com
Subject: RE: CGI with Apache and Sybperl on Red Hat 5.0/5.1
Date: Jun 10 1998 6:22PM

Unfortunately, this is exactly the dead end I've run into as well which sent
me back to 4.2.  Once the environment vars. are set properly, either via
profile or SetEnv in httpd.conf, or both, all other errors disappear but so
does your output.

I changed one of my test scripts to an nph (non-parsed header) script so I
could set the headers directly, and this avoided the server error, but there
was nothing after the Content-type header (which was printed out at the top
of the script... note that I could print out some text between the
content-type header and the 'use Sybase::CTlib;' line).  Everything after
'use Sybase::CTlib;' just vanished, as could be seen by telnetting to the
web server on port 80 and issuing the HTTP GET request manually.  Exactly
the same symptoms with Sybperl and DBD.

Regards,

Nathan Harper

-----Original Message-----
From: owner-SYBPERL-L@listproc.net
[mailto:owner-SYBPERL-L@listproc.net]On Behalf Of Michael Peppler
Sent: Wednesday, June 10, 1998 11:34 AM
To: SybPerl Discussion List
Subject: Re: CGI with Apache and Sybperl on Red Hat 5.0/5.1


Leigh Moncher writes:
 > Sorry 'bout the previous, Eudora acted up with the cut and pasted text.
 >
 > Okay it's not a permissions error because as nobody (su'd to it) the
script
 > works fine.  I've also granted world rwx on that directory.  I've set the
 > SYBASE directive in the /etc/profile.

That may not be enough. http servers are known to limit the
environment variables that they pass to their children (cgi scripts)
for security reasons.

See the SetEnv directive for Apache's config files, or make sure that
$ENV{SYBASE} is set properly in a BEGIN block *before* the 'use
Sybase::CTlib' directive.

[reads on....]

ah I see you already did that.

hmm... the error message you get is pretty clear, but it's weird.

Try this:

in the BEGIN {} block, print out the CGI header (ie

BEGIN {
	print "Content-Type: text/html\n\n";
	$ENV{SYBASE} = ...
}

use Sybase::CTlib;

etc...

maybe this will let you see the errors in the browser...

Michael
--
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com