RE: RHEL 5 x86_64, Oracle 10g 64 bit, apache 2.2 and DBD:Oracle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I found the problem and I would like to share it with you.

For an unknown reason it seems that Oracle 10g (10.2.0) has not set read
access for "other" group. I tried to run my apache server as "oracle" user
and it works. Then after, I put back defaulr user for apache, but add this
user (apache) to the oinstall group and it also works.

I don't know what is the file that was unreadable before. If somebody knows
I will be happy to know this folder/filename.

Thank you again for your help.

Regards,

_____________________________________
Yanick Quirion
Network & System Administrator
Tranzyme Pharma Inc.
 
(819) 820-6840 (phone)
(819) 820-6855 (direct)
(819) 820-6841 (fax)
(819) 570-6855 (mobile)
 
YQuirion@xxxxxxxxxxxx
www.tranzyme.com
 

-----Original Message-----
From: jslive@xxxxxxxxx [mailto:jslive@xxxxxxxxx] On Behalf Of Joshua Slive
Sent: 27 April, 2007 09:23
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  RHEL 5 x86_64, Oracle 10g 64 bit, apache 2.2 and
DBD:Oracle

On 4/27/07, Yanick Quirion <YQuirion@xxxxxxxxxxxx> 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@xxxxxxxxxx
> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux