Re: [PHP4BETA] oracle connection problems
| From: | thies at digicol dot de | Date: | Fri, 25 Feb 2000 11:22:51 +0000 |
| Subject: | Re: [PHP4BETA] oracle connection problems | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10932@lists.php.net to get a copy of this message | ||
On Fri, Feb 25, 2000 at 11:59:51AM +0100, Harold wrote:
> >
> > please make sure that you don't use putenv() to set your
> > oracle environment vars (ORACLE_HOMEetc). instead set them
> > before you start apache!
> >
> >
> > are connection to a local or remote database?
> >
>
> we have put our environment variables for oracle in /etc/profile and with
> putenv in apache httpd.conf.. is this putenv a problem? we have only did
> this because apache/php wasnt recognising the environments set in
> /etc/profile (we looked via phpinfo).. we have set:
>
> export ORACLE_BASE=/opt/oracle
> export ORACLE_HOME=$ORACLE_BASE/8.0.5
> export LD_LIBRARY_PATH=$ORACLE_HOME/lib
> export ORACLE_TERM=386
> export PATH=$PATH:$ORACLE_HOME/bin
> export ORA_NLS33=/opt/oracle/8.0.5/ocommon/nls/admin/data
> export NLS_LANG=german_germany.we8iso8859p1
> export NLS_LANGUAGE=german
> export NLS_DATE_LANGUAGE=german
> export NLS_DATE_FORMAT=DD/MM/YYYY
> export NLS_NUMERIC_CHARACTERS=.,
>
> in /etc/profile, and with putenv the same variables in httpd.conf..
please *dont't* set anything related to oracle using putenv()
in your script. i suspect this beeing the source of various
problems! explanation:
OCIInitialize() is called when the module is loaded, and that
is before any script ever had a chance to call PutEnv(). it
seems that certain env-vars need to be known at this stage so
the only choice is to set them *before* you start apache!
>
> we are connecting to a remote linux oracle server (8.0.5)..
are you running 8.0.5 or 8.0.5.1. i would highly
recomment to use 8.0.5.1!
>
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany