develooper Front page | perl.dbi.users | Postings from August 2006

RE: ORA-01017 ... but only when script is run as CGI

Thread Previous | Thread Next
From:
Garrett, Philip
Date:
August 18, 2006 10:25
Subject:
RE: ORA-01017 ... but only when script is run as CGI
Message ID:
D9C13100F14E4C4795A1E83B125B40350232B4F3@MSCEXCHS02.man.co
Angus McIntyre wrote:
> I'm using current versions of DBI and DBD::Oracle in a CGI script,
> Oracle 
> 10.2 client talking to an Oracle 9 database, RedHat Linux. The script
> previously ran successfully on a similar machine with the Oracle 9
> client. 
> 
> I have a simple test script, in which the username, password and SID
> are hardcoded. If I run this script from the command line, it
> connects without problems.
> 
> If I call the script as a CGI script, I get ORA-01017 in
> OCISessionBegin, which is the bad username or password error.
> 
> As far as I can tell, environment variables are the same in both
> contexts, the same tnsnames.ora file is used, and so forth. I have
> identified and resolved permissions errors, so I think that isn't the
> problem. 
> 
> Has anyone encountered something similar, or does anyone have any
> suggestions for other things that I should check in order to resolve
> this? 

I have had this problem before. I'm not positive, but I think it was
caused by ORACLE_HOME not being passed through by Apache.  If you're
running Apache, you'll need this directive in your httpd.conf:
    PassEnv ORACLE_HOME

hth
Philip

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About