httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] RHEL 5 x86_64, Oracle 10g 64 bit, apache 2.2 and DBD:Oracle
Date Fri, 27 Apr 2007 13:22:47 GMT
On 4/27/07, Yanick Quirion <YQuirion@tranzyme.com> wrote:

> This tells me that my Oracle configuration is fine and that perl Oracle:DBD
> is working also.
> The problem appear when I ran the script from a web browser. On my browser,
> I enter http://www.domain.com/cgi-bin/toto.pl and I got the following error
> into error_log:
>
> ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions,
> etc. at ...

I'd guess that it isn't going to work to set those variable inside the
perl script, since the oracle stuff gets initialized before the
variables are set.

Instead, you should try setting them in the environment that apache is
run under. An easy way to do that is to add them to the envvars script
in the apache binary directory (assuming a standard install).

Joshua.


>
> On my script I clearly define all necessary environment variables. To make
> sure the environment are correctly set, I create another small script:
>
> ============================================================================
> =========
> #!/usr/bin/perl
>
> use DBI;
> use DBD::Oracle;
>
> # Environmental variables used by Oracle
> $ENV{DBI_USER} = "phone";
> $ENV{DBI_PASS} = "123456";
> $ENV{DBI_DSN} = "DBI:Oracle:host= oracle.domain.com;sid=db1;port=1522";
> $ENV{ORACLE_HOME}  = "/usr/app/oracle/product/10.2.0";
>
> print "Content-type: text/html\n\n";
>    print "<tt>\n";
>    foreach $key (sort keys(%ENV)) {
>       print "$key = $ENV{$key}<p>";
>    }
>
> exit;
> ============================================================================
> =========
>
> And the result from my web browser is next:
>
> DBI_DSN = DBI:Oracle:host=oracle.domain.com;sid=db1;port=1522  <---
> DBI_PASS = 123456  <---
> DBI_USER = phone   <---
> DOCUMENT_ROOT = /u/Intranet
> GATEWAY_INTERFACE = CGI/1.1
> HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> application/x-shockwave-flash, application/vnd.ms-excel,
> application/vnd.ms-powerpoint, application/msword, application/xaml+xml,
> application/vnd.ms-xpsdocument, application/x-ms-xbap,
> application/x-ms-application, */*
> HTTP_ACCEPT_ENCODING = gzip, deflate
> HTTP_ACCEPT_LANGUAGE = en-ca
> HTTP_CONNECTION = Keep-Alive
> HTTP_COOKIE =
> GinkgoConfig=autoRefresh:0¤tPage:ms-dactl.php%3Findex%3D1&showHelpIcon:yes¤t
> Submenu:SUBFRAME.TPL%3FcurrentSubmenu%3D/hmastor/ms-damnu.php%26index%3D1;
> keepusername_db=yanqui%3Aon%3Aswitch
> HTTP_HOST = callisto.tranzyme.com
> HTTP_UA_CPU = x86
> HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET
> CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
> ORACLE_HOME = /usr/app/oracle/product/10.2.0 <---
> PATH = /sbin:/usr/sbin:/bin:/usr/bin
> QUERY_STRING =
> REMOTE_ADDR = 2.2.2.2
> REMOTE_HOST = toto.domain.com
> REMOTE_PORT = 19895
> REQUEST_METHOD = GET
> REQUEST_URI = /cgi-bin/toto.pl
> SCRIPT_FILENAME = /u/Intranet/cgi-bin/toto.pl
> SCRIPT_NAME = /cgi-bin/toto.pl
> SERVER_ADDR = 10.32.2.10
> SERVER_ADMIN = webmaster@domain.com
> SERVER_NAME = www.domain.com
> SERVER_PORT = 80
> SERVER_PROTOCOL = HTTP/1.1
> SERVER_SIGNATURE = Apache/2.2.3 (Red Hat) Server at www.domain.com Port 80
> SERVER_SOFTWARE = Apache/2.2.3 (Red Hat)
>
> ============================================================================
> ==================
> I highlight all variable that I set from my script using <----.
>
> I don't understand why the script doesn't work from a web page. I have a
> similar setup on  a EHRL 4 32 bit and it works great. I tried to downgrade
> Oracle:DBD but it didn't change anything.
>
> Is somebody can help me with that?
>
> Best Regards,
> Yanick Quirion
>
>
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message