Hi,
I have currently got PHP set up with Apache which is accessing an Oracle database server for its data. To create the connection to the oracle database I am using ADODB connect as shown in the following snippet:
$this->db_link = &ADONewConnection($this->database_type);
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
if( $this->sql_debug == "on" )
$this->db_link->debug = true;
$this->db_connect($host, $user, $passphrase, $database);
function db_connect( $host = '', $user = '', $passphrase = '', $database = '' ) {
// create a db connection
// see configVars.php for details on how to
// configure the db connection
// connect
$this->db_link->PConnect($host, $user, $passphrase, $database);
if( $database and $this->db_link ) {
$this->dbName = $database;
}
return( $this->db_link );
The connection works, and I can access my data, but there is a problem with the persistent connection.
Basically PConnect does not work as multiple connections are continously made to the same oracle database instead of the usual one persistent connection for all transactions. There is no real pattern to when a new connection is made in addition to the present ones, but of course, because non of the connections are ever killed (without restarting apache), eventually the database dies as there is too much traffic. This problem seems to be exasperated when accessing the program from a browser on a different machine, and not on the local one (where the php is stored).
This is a strange problem, and I am not shure what to do.
Does anybody have some good advice to give me on how to correect the problem.
Thanks.