Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cannot connect to database through http
On Fri, 16 May 2003 15:21:15 -0700, Chr2k04 wrote:
> Hey,
> I'm trying to access my database with perl using DBI and DBD::Oracle.
> The script runs fine from the terminal, but the program runs up to the
> DBI->connect statement running from the browser. I get the following
> error in my error_log:
>
> [Fri May 16 18:13:22 2003] [error] [client 192.168.1.1]
> DBI->connect(Delphi) failed: (UNKNOWN OCI STATUS 1804) OCIInitialize.
> Check ORACLE_HOME and NLS settings etc. at /var/www/main/seconddbi.cgi
> line 19
> [Fri May 16 18:13:22 2003] [error] [client 192.168.1.1] Couldn't
> connect to database: (UNKNOWN OCI STATUS 1804) OCIInitialize. Check
> ORACLE_HOME and NLS settings etc. at /var/www/main/seconddbi.cgi line
> 19.
>
> I have a begin {} statement in the beginning of the program that sets
> ORACLE_HOME, ORACLE_SID, and LD_LIBRARY_PATH. I even have SetEnv
> statements in my httpd.conf.
>
> Do I have to set the listener to listen to port 80, and if so, how do
> I do it?
>
> Thanks,
> Chris
Well, if I were you, I'd try with setting the ENV within the perl code , as in
ENV{'ORACLE_HOME'}="/oracle/product/5.1.22";
-- Mladen Gogala Software is like sex, it is better when it is free. Linus TorvaldsReceived on Sat May 17 2003 - 01:02:15 CDT