Re: Why must I set ORACLE_xxx before starting apache vs inside a script?
| From: | Thies C. Arntzen | Date: | Mon, 23 Oct 2000 16:30:15 +0000 |
| Subject: | Re: Why must I set ORACLE_xxx before starting apache vs inside a script? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3888@lists.php.net to get a copy of this message | ||
On Fri, Oct 20, 2000 at 01:43:07PM -0700, Paul Fernandez wrote:
> I went to the linux and sun boxes that we run PHP on and set the
> environment variable from the command line, even after the apache server
> started. It fixed the issue I had with error 12514.
>
> It begs the question -- does PHP successfully set variables via putenv()
> when it comes to Oracle connections?
no - because the oracle-libs are initialized when apache
starts - just after the php-module is loaded - but far before
any script had a chance to call putenv(). sadly enough the
oracle libs seem to "read" the environment variables only
when they get initialized.
we could try to delay the init call much more but:
- i expirienced random problems.
- if the user switches his ORACLE_SID/ORACLE_HOME in the
script persistent connections would no longer point to the
"right" server.
tc
>
> I know I'm not the only guy who will test my PHP scripts on a
> development database, and need to switch back and forth.
>
> ORA_HOME will always point to the same directory regardless of the
> database. But ORACLE_SID should be addressable if we can't properly
> pass the database in ocilogon....
>
> I'm really confused here :)
>
> --
> Paul Fernandez
> Webmaster
> Structural GenomiX, Inc.
> www.stromix.com
> 858.558.4850
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>