Date: 02/28/01
- Next message: coberau <email protected>: "[PHP-DEV] PHP 4.0 Bug #9497: closed mysql connection after calling a function that uses another mysql conn."
- Previous message: Phil Driscoll: "Re: [PHP-DEV] ctype function (re?)naming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: jean-francois.gosset <email protected>
Operating system: linux red hat 6.2
PHP version: 4.0.4pl1
PHP Bug Type: OCI8 related
Bug description: Mixing non persistant and persistant connection makes all connexions persistant
With the following test (test_oci8.php) both connexions (USER_1 and USER_2) are persistant.
Notes :
1. We can see that connexions are persistant with the following SQL command :
select username, status, logon_time from v$session where username='USER_1' or username='USER_2';
2. We can use the following workaround : use a different database name for USER_1 and USER_2 (who acces the same real database).
3. If we invert the order of connexions (USER_2 before USER_1) and use OCInlogon for USER_1, only USER_2 has persistant connexions but the number of connexions of USER_2 increase until to reach the maximum limit (ORA-00604 error).
-------------------------------
test_oci8.php
-------------------------------
<html>
<title>OCI8 bug test</title>
</head>
<body>
<%
$user = "USER_1";
$password = "pwd1";
$database = "TEST";
{
// should be non persistent !!!!
$connexion = OCIlogon (
$user,
$password,
$database);
if (!$connexion)
{
trigger_error (
"Erreur OCIlogon $user / $database",
E_USER_ERROR);
}
else
{
echo "<p>Connexion 1 OK";
}
OCIlogoff ($connexion);
}
{
$user = "USER_2";
$password = "pwd2";
$database = "TEST";
// If we use a different databasename (for the same real database) we don't have the problem
// $database = "TEST2";
$connexion = OCIplogon (
$user,
$password,
$database);
if (!$connexion)
{
trigger_error (
"Erreur OCIplogon $user / $database",
E_USER_ERROR);
}
else
{
echo "<p>Connexion 2 OK";
}
OCIlogoff ($connexion);
}
%>
</body>
</html>
-------------------------------
-- Edit Bug report at: http://bugs.php.net/?id=9496&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: coberau <email protected>: "[PHP-DEV] PHP 4.0 Bug #9497: closed mysql connection after calling a function that uses another mysql conn."
- Previous message: Phil Driscoll: "Re: [PHP-DEV] ctype function (re?)naming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

