Hello Swen,

i can remember that i had exactly the same problem with apache and
db2connect. The problem is that the db2 enviroment variables are unknown
when scripts are started by apache. If a program is started from the
command line it works because the variables are set.
Thats what i did to let the perl programs run properly. But I am using
mod_perl..... If you are not using please have a look that you set all vars
with the setenv directive in httpd.conf . Following entries are in
hhtpd.conf: Hope this helps

    # modperl setup
    ###### use Perlrequire to load modules instead of PerlModule directive
    Perlrequire /var/www/perllib/startup.pl
    ###### reload scripts and modules in cache when apachectl restarts
    PerlFreshRestart On

 ###### set db2 environment for mod_perl programs
    PerlSetEnv DB2INSTANCE db2inst1
    PerlSetEnv DB2INST /usr/lib/db2/db2inst1
    PerlSetEnv DB2_HOME /usr/IBMdb2/V7.1
    PerlSetEnv INSTHOME /usr/lib/db2/db2inst1
    PerlSetEnv DB2C WD01
    PerlSetEnv DROOT /www/htdocs

    ###### taint check on. option -T in script is not sufficient
    PerlTaintCheck On
    ###### for CGI-PERL 1.1 (use modperl)
     Alias /cgi-bin/  /www/htdocs/cgi-bin/

Mit freundlichen Gruessen / Best regards
Michael Hartmann
____________________
HSBC Trinkaus & Burkhardt
Koenigsalle 21 - 23, 40212 Duesseldorf

Office:  +49-(0)211 910 -2364,  Fax -2060
e-mail:  [EMAIL PROTECTED]




                                                                                       
                                   
                      "Swen Schillig"                                                  
                                   
                      <[EMAIL PROTECTED]        An:       [EMAIL PROTECTED]            
                                   
                      com>                     Kopie:                                  
                                   
                      Fax-Deckblatt:           Blindkopie:                             
                                   
                      HSBCTuB                  Thema:    DBI and Apache                
                                   
                                                                                       
                                   
                      09.10.2002 10:24                                                 
                                   
                                                                                       
                                   
                                                                                       
                                   




This might be a bit OT here but I don't know where else to go with this.

My perl script is not running under apache(2.0.43)  and it's complaining
that the DB2 environment is not set properly even though it's running fine
on the command line.

Is there something I've to tell apache on how to use the DB2 driver ?
I already set DB2INSTANCE=db2inst1 with the SetEnv statement in httpd.conf
but
it didn't help.

Any hints ?

Swen






______________________________________________________________________
Der Austausch von Nachrichten mit HSBC Trinkaus & Burkhardt via E-Mail
dient ausschliesslich Informationszwecken. Rechtsgeschaeftliche
Erklaerungen duerfen ueber dieses Medium nicht ausgetauscht werden.
Verfaelschungen des urspruenglichen Inhaltes dieser Nachricht bei der
Datenuebertragung koennen nicht ausgeschlossen werden.

Correspondence with HSBC Trinkaus & Burkhardt via e-mail is only for
information purposes. This medium is not to be used for the exchange of
legally-binding communications. The falsification of the original content
of this message in the course of data transmission cannot be excluded.


Reply via email to