Re: PHP going to wrong Oracle SID
| From: | Mike Hanney | Date: | Tue, 01 Aug 2000 10:40:00 +0000 |
| Subject: | Re: PHP going to wrong Oracle SID | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1665@lists.php.net to get a copy of this message | ||
Hi Paul,
I've found using putenv to change the ORACLE_SID has no effect on the SID used for OCIlogon until I also set $HTTP_ENV_VARS["ORACLE_SID"].
For example:
echo "$ORACLE_SID <br>\n";
putenv ("ORACLE_SID= my_new_sid");
echo getenv (ORACLE_SID);
echo getenv (ORACLE_SID) shows the correct SID as you say, but calling phpinfo() shows that HTTP_ENV_VARS["ORACLE_SID"] remains unchanged.
So, if I also use:
$HTTP_ENV_VARS["ORACLE_SID"] = "my_new_sid";
It seems to work.
Hope this helps.
Mike.
TradeBasics Ltd.
[Oracle 8.1.5]
[Apache/1.3.9 PHP/4.0.1p12 statically linked]
[RedHat Linux 6.1, Kernel 2.2.12]
At 11:15 31/07/00 -0700, Paul Fernandez wrote:
Hello again, config: oracle 8.1.5, php4, apache -- all on the same box My script is going to the wrong SID. $connection = OCILogon($username,$password,"prod"); When I echo $ORACLE_SID, the value is correct. But in actual performance, the script is running on the other SID. Is this a quirk in the listener.ora file? Thanks in advance, -- Paul Fernandez Webmaster Structural GenomiX, Inc. -- 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