Ocilogon to switch between db's/sid's (& php4 sess mgt)
| From: | Paul Fernandez | Date: | Tue, 08 Aug 2000 16:17:15 +0000 |
| Subject: | Ocilogon to switch between db's/sid's (& php4 sess mgt) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1859@lists.php.net to get a copy of this message | ||
I have inconsistent results using ocilogon to change between the
development db (sid) and production db (sid), which both reside on the
same oracle server.
The script I include at the top of each php page:
If ($username == 'paul'){$db = "dev";}
else {$db = "sgx";}
$connection = OCIPLogon($username,$password,$db);
The desired result is that when I log in, php routes me to the
development db, but all the other users go to the production version.
It seems so simple, but I get very strange results.
My only theory is that by using PHP4 session management, you must quit
the browser entirely before someone else logs in. Otherwise, PHP4 will
use the username/password attached to the initial cookie.
thank you
--
Paul Fernandez
Webmaster
Structural GenomiX, Inc.