Re: mod_perl and envirometal variables
Till Kindschus <[email protected]> Thu, 01 Jun 2006 11:46:58 +0200
| Newsgroups | gmane.linux.suse.db2 |
|---|---|
| Message-ID | <[email protected]> |
Hi,
you are under Linux/Unix?
I don't know too much about mod_perl. But until you run the Script
/home/db2inst1/sqllib/db2profile in the same shall that shall provide the
connection you get no results. Just to set the variables isn't enough.
Your's
Till
iv wrote:
> hello
>
> i've got a problem with connection to my database - db2.
>
> i'm trying to esteblish it from a mod_perl module; every time i get an
> error "null: DBI connect('my1st','iv',...) failed: Total Environment
> allocation failure! Did you set up your DB2 client environment?".
>
> i've searched the web and have carefully done what is suggested: set
> enviromental variables in an apache config file, in the way like this:
>
> PerlSetEnv DB2_PATH /opt/IBM/db2/
> PerlPassEnv DB2_PATH
>
> my module can see these variables appropriately in %ENV:
>
> CUR_INSTNAME - db2inst1
> DB2DIR - /opt/IBM/db2/V8.1
> DB2INSTANCE - db2inst1
> DB2_PATH - /opt/IBM/db2/V8.1
> INSTHOME - /home/db2inst1
> LD_LIBRARY_PATH - /home/db2inst1/sqllib/lib
> LIBPATH - /home/db2inst1/sqllib/lib
> SQLLIB - /home/db2inst1/sqllib/lib
> SQLLIB - /home/db2inst1/sqllib/lib
>
> (i've listed them simply running "foreach my $key (sort keys %ENV) {
> $r->print("$key - $ENV{$key}<br/>");}" )
>
> but it doesn't help: still no connection and the same error
>
> any ideas will be highly appreciated
> iv
>
--
Till Kindschus
Dipl.-Math.
b+m Informatik AG
Rotenhofer Weg 20
24109 Melsdorf
Fon +49(0)4340/404-4242, Mobil 0175/1611808
Fax +49(0)4340/404-111
[email protected]
Aktuelle b+m Infos unter www.bmiag.de
Diese E-Mail enthält vertrauliche und rechtlich geschützte
Informationen, die ausschließlich für den vorgesehenen Adressaten
bestimmt sind. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail
oder dessen Vertreter sein, so beachten Sie bitte, dass jede Form der
Kenntnisnahme, Speicherung oder Weitergabe des Inhalts dieser E-Mail
unzulässig ist. Wir bitten Sie, in diesem Fall den Absender zu
informieren und die E-Mail mit sämtlichen Anlagen dauerhaft zu löschen.