|
|
sybperl-l Archive
Up Prev Next
From: "Robert Bresner" <rbresner at olf dot com>
Subject: Re: use Sybase::Sybperl messing up CGI ?
Date: Mar 22 2000 3:05AM
Yeah..
Once the script started failing, environment was the first thing I checked...
I also did checks on the permissions of various perl bits when the CGI is
running..
I don't use CGI, so I did it in a BEGIN block.
In addition to a very similar foreach as the one you provided,
I also had:
foreach my $inc( sort keys %INC ) {
print "$inc => $INC{$inc} \n";
-r $INC{$inc} and print "nbsp;nbsp;nbsp;nbsp;CAN READ \n";
etc, etc, etc.
}
That all passed my muster as well...
Robert Lang wrote:
>
> Is the SYBASE environment variable set at the System level? Remember that
> the server runs as the "system" account. (You'll also need %SYBASE%\dll in
> your System level path...)
>
> One thing that I've found that helps is to write a little script that dumps
> out the environment variables. That way you are sure. Something like this:
>
> #!/usr/bin/perl
>
> use CGI qw(:standard);
> use CGI::Carp qw(fatalsToBrowser);
>
> $q = new CGI({});
>
> print $q->header;
> print $q->start_html("Env Test");
>
> print $q->h1("Environment Variables");
> foreach $key ( sort keys %ENV )
> {
> print $q->h2("$key\t$ENV{$key}");
> }
>
> print $q->end_html;
>
> exit 0;
>
> Regards,
>
> Robert Lang
> rlang@lincap.com
>
> -----Original Message-----
> From: Robert Bresner [mailto:rbresner@olf.com]
> Sent: Tuesday, March 21, 2000 4:23 PM
> To: SybPerl Discussion List
> Subject: use Sybase::Sybperl messing up CGI ?
>
> Howdy...
>
> IIS - 4.0
> NT Server 4.0
> Perl 5.004_04 / ASPerl 5.005_05
> Sybperl 1.27 ? 2.11 ? ( See below )
>
> We recently changed from a *nix based web server to a WinNT IIS server,
> and only the CGI scripts using Sybase::Sybperl are having troubles.
> That's, of course, all of the good ones...
>
> With Netscape and IE4-5, I get this output:
> at C:/Perl/site/lib/Sybase/Sybperl.pm line 79
> BEGIN failed--compilation aborted at
> C:/Perl/site/lib/Sybase/Sybperl.pm
> line
> 79.
> BEGIN failed--compilation aborted at D:\intra\enterprise\rel_req.cgi
> line 7.
> (Which seems to be missing a line or two ? )
>
> The program runs perfectly from the command line on the server.
> I've also set QUERY_STRING before running, and still no problems.
> Only when the script is executed from a browser does it fail
> with the above output.
> The script also seems to run fine when the
> use Sybase::Sybperl
> line is removed. ( Of course, the database stuff fails, but the page
> itself displays, instead of the CGI Error page or the above error msgs.)
>
> I tried removing the -w and use strict; from the Perl file, remembering
> some very old issues with that and use Sybase::Sybperl;. Still no help.
>
> We were using the CPAN perl 5.004_04, then downloaded and tried
> ActiveState Perl 5.005_05. Sybperl.pm tells me the version is 1.27,
> ActiveState's PPM.exe tells me Sybperl version is 2.11, and up to date.
>
> I know this isn't a CGI list, but I'm hoping someone experienced
> (and fixed :) at least something similar to the problem I'm experiencing,
> or can point me to a better place to post.
>
> --
> ----------------------------------------
> Robert Bresner rbresner@olf.com
> Open Link Financial 516-227-6600 x216
> http://www.olf.com/ fax: 516-227-1799
> ----------------------------------------
> Opinions expressed are explicitly my own
> Hello. My name is Albert, and I have got
> schizophrenia. --Taoist meditation chant
--
----------------------------------------
Robert Bresner rbresner@olf.com
Open Link Financial 516-227-6600 x216
http://www.olf.com/ fax: 516-227-1799
----------------------------------------
Opinions expressed are explicitly my own
Hello. My name is Albert, and I have got
schizophrenia. --Taoist meditation chant
|