Hi,
I created an OracleConnection class which as you might suspect connects to an Oracle database. I want to instantiate this class ONCE in my application, and then use this class from other pages as well. This works fine using session_register and session_start, EXCEPT for the connectionID property which is returned by the OCILogon or OCIPLogon function. So :
logon.php :
$conn = new OracleConnection("user", "pass", "sid");
The constructor sets username and password, and does the actual OCIPLogon which returns connectionID;
session_register("conn");
So far so good...
otherpage.php :
require ("oracleclass.php");
session_start();
echo $conn->username; (works OK)
echo $conn->pass; (works OK)
echo $conn->connectionID; (FAILS is 0)
Why doesn't this work ?
Thanks.
Jasper
I created an OracleConnection class which as you might suspect connects to an Oracle database. I want to instantiate this class ONCE in my application, and then use this class from other pages as well. This works fine using session_register and session_start, EXCEPT for the connectionID property which is returned by the OCILogon or OCIPLogon function. So :
logon.php :
$conn = new OracleConnection("user", "pass", "sid");
The constructor sets username and password, and does the actual OCIPLogon which returns connectionID;
session_register("conn");
So far so good...
otherpage.php :
require ("oracleclass.php");
session_start();
echo $conn->username; (works OK)
echo $conn->pass; (works OK)
echo $conn->connectionID; (FAILS is 0)
Why doesn't this work ?
Thanks.
Jasper