I've seen similar behavior with environment variables disappearing.  I
have not been able to track it down, but I have been able to work
around some of the problems.

My specific problem was losing the ORACLE_HOME environment variable,
which meant the oracle client libraries could not find their config
file (tnsnames.ora).  I ended up using the 'long' oracle dbi DSN
specification, which bypasses the config file altogether.  Perhaps
there is a similar thing in SYBASE?

You might try insuring that your modules are preloaded into the
server.  That way you can be sure they initialize their state before
the environment gets corrupted. It seems that HUPing has caused me
problems in the past.

Also, you might consider explicitly setting the ENV variable in your
Script_OnStart function..  I've had to do this for certain things in
the past to insure a clean state..

Finally, consider writing a small script that dumps the environment;
but not by using Perl, instead exec /bin/env to get the real picture.

On Sun, Dec 19, 1999 at 09:35:09PM -0800, Carl Lipo wrote:
> 
> I am having recurring troubles using the Date::Manip and DBD::Sybase
> modules in the contest of mod_perl/ASP pages. 75%-90% of the time my ASP
> pages will work just fine.  The reminder 25-10% I get these kinds of
> errors:
> 
> [Fri Dec 17 12:27:51 1999] [error] [asp] [7922] [error] ERROR: Date::Manip
> unable to determine TimeZone. <-->   Date::Manip::Date_TimeZone called at
> /usr/lib/perl5/site_perl/Date/Manip.pm line 608 <--> Date::Manip::Date_Init()
> called at /usr/lib/perl5/site_perl/Date/Manip.pm line 1295 <-->
> Date::Manip::ParseDate('today') called at (eval 49) line 103 <-->
> 
> or
> 
> The context allocation routine failed when it tried to load localization
> files!! One or more following problems may caused the failure
> Cannot access the sybase home directory, please check environment variable
> SYBASE or ~sybase [Fri Dec 17 15:51:57 1999] [error] [asp] [16617] [error] 
> install_driver(Sybase) failed: DBD::Sybase initialize: cs_ctx_alloc()
> failed at/usr/lib/perl5/i586-linux/5.00404/DynaLoader.pm line 185. <-->
> at /usr/lib/perl5/site_perl/PNAP/Database/Query.pm line 276 <-->
> (in cleanup) Can't call method "disconnect" without a package or
> object reference at /usr/lib/perl5/site_perl/PNAP/Database/Query.pm line
> 294. <--> , /usr/lib/perl5/site_perl/Apache/ASP.pm line 1102
> 
> The odd thing is that at some times the problems are worse than others. I
> havent been able to correlate this behavior with memory or cpu usage. I
> tried everything I can think of to stop this problem: I have tried using a
> PerlRequire entry in the httpd.conf to include the modules when the server
> starts up. I have added the two ENV variables to the httpd.con as
> PerlSetVar and PerlPassEnv entries. I explicitely use BEGIN statements in
> the ASP code and set the ENV variables. However, nothing so far has worked
> -- at some frequency at least *some* of the children cannot get the TZ or
> the SYBASE environmental variable. Its driving me nuts!
> 
> In the archives, I saw that at least one or two people in the past noted
> this problem but I never saw how it was resolved. Is there something I'm
> missing in the mod_perl configuration? Something I need to do? Any advice?
> 
> The server is Intel Linux 2.0.35 
> Server version: Apache/1.3.9 (Unix)
> Perl 5.00503
> mod_perl Version 1.20
> ASP version 0.16 (but also has same behavior with 0.17)
> 
> ----------------------------------------------------------------------------
> Carl Lipo                                     EMAIL: [EMAIL PROTECTED]
> IT Systems Architect                          PAGER: 888.393.5620
> InterNAP Network Services                     OFFICE: 206.504.5442
> 601 Union Street, Suite 1000                  FAX: 206.264.1833
> Seattle, WA  98101                            CELL: 206.579.0163

-- 
Paul Lindner
[EMAIL PROTECTED]
Red Hat Inc.

Reply via email to