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:
Angus McIntyre
Date:
August 18, 2006 11:39
Subject:
RE: ORA-01017 ... but only when script is run as CGI
Message ID:
22056.216.169.140.2.1155926369.squirrel@webmail.nomadcode.com
On Fri, August 18, 2006 2:16 pm, Reidy, Ron wrote:
> So, there is no private tnsnames.ora nor $TNS_ADMIN defined on the
> server (or in httpd.conf) at all?  I ask again, because if either of
> these situations exists, that would explain the problem.

No, there's just one 'tnsnames.ora' file in use.

I finally found the solution by adding code to the script to print out
environment variables. Comparison of the output in command-line and CGI
mode revealed one difference, which was that when run as a CGI the
environment included a value for NLS_LANG, set by a line in 'httpd.conf'
that read:

     SetEnv NLS_LANG AMERICAN_AMERICA.AL16UTF16

Removing that line fixed the problem, and the script (and other scripts)
now run fine when invoked via CGI.

> BTW - Having Apache in the same group as the oracle software might be a
> gaping security hole.  Just a thought.

And a good thought. Apache now runs as 'nobody'.

Thank you all for your help,

Angus


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