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: HaiderAziz at caspian dot com
Subject: RE: Error in running Sybperl CGI under Apache (Win32)
Date: Feb 9 1998 3:14PM

Hi Michael,

Thanks for your help. I have been able to find the problem. Your e-mail
gave me the clue I needed, WinNT environment variables!! I am using NT
workstation 4.0 (service pack #3.) So I tried the 'brute force' method
which always seems to work for Microsoft stuff. And the result is that
the variable  'SystemRoot' must be defined and was missing. It is one of
these special ones that Windows defines internally somehow, because you
can't get at it from the System Control Panel.

Anyway, adding at the top of the script:
----------------
BEGIN {
 $ENV{SystemRoot}="C:\\WINNT";
}
---------------
Fixed the problem. Thank you very much for your help, and I hope this
helps anyone else trying to get Apache/Perl/Sybperl running under NT!!

Regards,
Haider

> ----------
> From: 	Michael Peppler[SMTP:mpeppler@mbay.net]
> Reply To: 	SYBPERL-L@trln.lib.unc.edu
> Sent: 	06 February 1998 22:20
> To: 	SYBPERL-L@trln.lib.unc.edu
> Subject: 	Re: Error in running Sybperl CGI under Apache (Win32)
> 
> **********************************************************************
> ***
> WARNING: This message has been received via the Internet.
> CAUTION:  No orders may be accepted via the Internet.
> Any order received must be promptly confirmed verbally with the
> sender.
> Any attachments received have been checked for viruses but should be 
> treated with caution due to their origin over a public network.
> **********************************************************************
> ***
> 
> HaiderAziz@caspian.com wrote:
> > 
> > > Michael,
> > >
> > Thanks for your help! Yes you were absolutely right, the first
> script
> > failed because it didn't have a '#!/perl/bin/perl.exe' at the top of
> the
> > file so Apache was trying to run it with bash. However, I am still
> > getting this in the 'error_log':
> > ------------------
> > DB-Library error:
> >         Net-Lib protocol driver call to connect two endpoints failed
> > Operating-system error:
> >         Error in creating a socket - Error is 10106
> > Can't call method "dbuse" without a package or object reference at
> > /Web/cgi-bin/html_tst_pl line 17.
> > ------------------
> 
> Something is wrong with your environment when the script is run
> as a CGI, and this causes the connection to Sybase to fail.
> 
> I don't know *what* is wrong, though.
> 
> Try writing a little env.pl script that does something like:
> 
> #!/perl/bin/perl.exe
> 
> print "Content-Type/text-html\n\n";
> print "
\n";
> foreach (keys(%ENV)) {
>     print "$_: $ENV{$_}\n";
> }
> print "
\n"; > > __END__ > > and see which environment variables seem to be wrong (like SYBASE, > etc.). > > Michael > -- > Michael Peppler -||- Data Migrations Inc. > mpeppler@datamig.com -||- http://www.mbay.net/~mpeppler > ********************************************************************* Caspian is not responsible for any securities related recommendation, solicitation, offer or agreement, or any information about any transaction contained in this communication. *********************************************************************