Ask a Question related to PHP Bugs, Design and Development.
-
david at acz dot org #1
#39352 [NEW]: oci_close fails with global keyword
From: david at acz dot org
Operating system: SuSE Linux 9.3
PHP version: 5.2.0
PHP Bug Type: OCI8 related
Bug description: oci_close fails with global keyword
Description:
------------
oci_close() fails if the connection resource is a global accessed via the
"global" keyword, but works if accessed using the $GLOBALS array.
Reproduce code:
---------------
$conn = oci_connect(DB_USER, DB_PASS, DB_NAME);
var_dump($conn);
global_keyword();
global_array();
function global_keyword()
{
global $conn;
var_dump($conn);
oci_close($conn); // this seems to do nothing
var_dump($conn);
}
function global_array()
{
var_dump($GLOBALS["conn"]);
oci_close($GLOBALS["conn"]); // this works
var_dump($GLOBALS["conn"]);
}
Expected result:
----------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
NULL
PHP Warning: oci_close() expects parameter 1 to be resource, null given
NULL
Actual result:
--------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
--
Edit bug report at [url]http://bugs.php.net/?id=39352&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39352&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39352&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39352&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39352&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=39352&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=39352&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39352&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=39352&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=39352&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=39352&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=39352&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=39352&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=39352&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39352&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=39352&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=39352&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39352&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=39352&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39352&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39352&r=mysqlcfg[/url]
david at acz dot org Guest
-
#40313 [NEW]: oci_close() has no effect when in a transaction
From: christopher dot jones at oracle dot com Operating system: n/a PHP version: 5.2.1RC4 PHP Bug Type: OCI8 related Bug... -
#39569 [Opn->Fbk]: OCI_Close doesn't close the connection.
ID: 39569 Updated by: tony2001@php.net Reported By: mc_hades at yahoo dot com -Status: Open +Status: ... -
#39569 [NEW]: OCI_Close doesn't close the connection.
From: mc_hades at yahoo dot com Operating system: HP-UX PHP version: 5.2.0 PHP Bug Type: OCI8 related Bug description: ... -
#25652 [Opn->Ver]: Calling Global functions dynamically fails from Class scope
ID: 25652 Updated by: sniper@php.net Reported By: john@php.net -Status: Open +Status: Verified Bug... -
#25652 [Com]: Calling Global functions dynamically fails from Class scope
ID: 25652 Comment by: peter dot prochaska at datev dot de Reported By: john@php.net Status: Open Bug Type: ... -
iliaa@php.net #2
#39352 [Opn->Asn]: oci_close fails with global keyword
ID: 39352
Updated by: [email]iliaa@php.net[/email]
Reported By: david at acz dot org
-Status: Open
+Status: Assigned
Bug Type: OCI8 related
Operating System: SuSE Linux 9.3
PHP Version: 5.2.0
-Assigned To:
+Assigned To: tony2001
Previous Comments:
------------------------------------------------------------------------
[2006-11-02 22:54:38] david at acz dot org
Description:
------------
oci_close() fails if the connection resource is a global accessed via
the "global" keyword, but works if accessed using the $GLOBALS array.
Reproduce code:
---------------
$conn = oci_connect(DB_USER, DB_PASS, DB_NAME);
var_dump($conn);
global_keyword();
global_array();
function global_keyword()
{
global $conn;
var_dump($conn);
oci_close($conn); // this seems to do nothing
var_dump($conn);
}
function global_array()
{
var_dump($GLOBALS["conn"]);
oci_close($GLOBALS["conn"]); // this works
var_dump($GLOBALS["conn"]);
}
Expected result:
----------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
NULL
PHP Warning: oci_close() expects parameter 1 to be resource, null
given
NULL
Actual result:
--------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39352&edit=1[/url]
iliaa@php.net Guest
-
anon at anon dot com #3
#39352 [Com]: oci_close fails with global keyword
ID: 39352
Comment by: anon at anon dot com
Reported By: david at acz dot org
Status: Assigned
Bug Type: OCI8 related
Operating System: SuSE Linux 9.3
PHP Version: 5.2.0
Assigned To: tony2001
New Comment:
reproduced on Windows 2003 server, using Nov 2 release of 5.2.0
Previous Comments:
------------------------------------------------------------------------
[2006-11-02 22:54:38] david at acz dot org
Description:
------------
oci_close() fails if the connection resource is a global accessed via
the "global" keyword, but works if accessed using the $GLOBALS array.
Reproduce code:
---------------
$conn = oci_connect(DB_USER, DB_PASS, DB_NAME);
var_dump($conn);
global_keyword();
global_array();
function global_keyword()
{
global $conn;
var_dump($conn);
oci_close($conn); // this seems to do nothing
var_dump($conn);
}
function global_array()
{
var_dump($GLOBALS["conn"]);
oci_close($GLOBALS["conn"]); // this works
var_dump($GLOBALS["conn"]);
}
Expected result:
----------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
NULL
PHP Warning: oci_close() expects parameter 1 to be resource, null
given
NULL
Actual result:
--------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39352&edit=1[/url]
anon at anon dot com Guest
-
tony2001@php.net #4
#39352 [Asn->Bgs]: oci_close fails with global keyword
ID: 39352
Updated by: [email]tony2001@php.net[/email]
Reported By: david at acz dot org
-Status: Assigned
+Status: Bogus
Bug Type: OCI8 related
Operating System: SuSE Linux 9.3
PHP Version: 5.2.0
Assigned To: tony2001
New Comment:
Actually this has nothing to do with OCI8, as this is the way PHP
handles resources.
You can do the same trick with MySQL and it won't actually close the
connection when using global variable, but it will work with $GLOBALS.
Previous Comments:
------------------------------------------------------------------------
[2006-11-06 08:50:31] anon at anon dot com
reproduced on Windows 2003 server, using Nov 2 release of 5.2.0
------------------------------------------------------------------------
[2006-11-02 22:54:38] david at acz dot org
Description:
------------
oci_close() fails if the connection resource is a global accessed via
the "global" keyword, but works if accessed using the $GLOBALS array.
Reproduce code:
---------------
$conn = oci_connect(DB_USER, DB_PASS, DB_NAME);
var_dump($conn);
global_keyword();
global_array();
function global_keyword()
{
global $conn;
var_dump($conn);
oci_close($conn); // this seems to do nothing
var_dump($conn);
}
function global_array()
{
var_dump($GLOBALS["conn"]);
oci_close($GLOBALS["conn"]); // this works
var_dump($GLOBALS["conn"]);
}
Expected result:
----------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
NULL
PHP Warning: oci_close() expects parameter 1 to be resource, null
given
NULL
Actual result:
--------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39352&edit=1[/url]
tony2001@php.net Guest
-
david at acz dot org #5
#39352 [Bgs->Opn]: oci_close fails with global keyword
ID: 39352
User updated by: david at acz dot org
Reported By: david at acz dot org
-Status: Bogus
+Status: Open
-Bug Type: OCI8 related
+Bug Type: Scripting Engine problem
Operating System: SuSE Linux 9.3
PHP Version: 5.2.0
Assigned To: tony2001
New Comment:
Changing category.
Previous Comments:
------------------------------------------------------------------------
[2006-11-08 10:08:45] [email]tony2001@php.net[/email]
Actually this has nothing to do with OCI8, as this is the way PHP
handles resources.
You can do the same trick with MySQL and it won't actually close the
connection when using global variable, but it will work with $GLOBALS.
------------------------------------------------------------------------
[2006-11-06 08:50:31] anon at anon dot com
reproduced on Windows 2003 server, using Nov 2 release of 5.2.0
------------------------------------------------------------------------
[2006-11-02 22:54:38] david at acz dot org
Description:
------------
oci_close() fails if the connection resource is a global accessed via
the "global" keyword, but works if accessed using the $GLOBALS array.
Reproduce code:
---------------
$conn = oci_connect(DB_USER, DB_PASS, DB_NAME);
var_dump($conn);
global_keyword();
global_array();
function global_keyword()
{
global $conn;
var_dump($conn);
oci_close($conn); // this seems to do nothing
var_dump($conn);
}
function global_array()
{
var_dump($GLOBALS["conn"]);
oci_close($GLOBALS["conn"]); // this works
var_dump($GLOBALS["conn"]);
}
Expected result:
----------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
NULL
PHP Warning: oci_close() expects parameter 1 to be resource, null
given
NULL
Actual result:
--------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39352&edit=1[/url]
david at acz dot org Guest
-
iliaa@php.net #6
#39352 [Opn->Bgs]: oci_close fails with global keyword
ID: 39352
Updated by: [email]iliaa@php.net[/email]
Reported By: david at acz dot org
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: SuSE Linux 9.3
PHP Version: 5.2.0
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
[url]http://www.php.net/manual/[/url] and the instructions on how to report
a bug at [url]http://bugs.php.net/how-to-report.php[/url]
..
Previous Comments:
------------------------------------------------------------------------
[2006-11-09 14:55:54] david at acz dot org
Changing category.
------------------------------------------------------------------------
[2006-11-08 10:08:45] [email]tony2001@php.net[/email]
Actually this has nothing to do with OCI8, as this is the way PHP
handles resources.
You can do the same trick with MySQL and it won't actually close the
connection when using global variable, but it will work with $GLOBALS.
------------------------------------------------------------------------
[2006-11-06 08:50:31] anon at anon dot com
reproduced on Windows 2003 server, using Nov 2 release of 5.2.0
------------------------------------------------------------------------
[2006-11-02 22:54:38] david at acz dot org
Description:
------------
oci_close() fails if the connection resource is a global accessed via
the "global" keyword, but works if accessed using the $GLOBALS array.
Reproduce code:
---------------
$conn = oci_connect(DB_USER, DB_PASS, DB_NAME);
var_dump($conn);
global_keyword();
global_array();
function global_keyword()
{
global $conn;
var_dump($conn);
oci_close($conn); // this seems to do nothing
var_dump($conn);
}
function global_array()
{
var_dump($GLOBALS["conn"]);
oci_close($GLOBALS["conn"]); // this works
var_dump($GLOBALS["conn"]);
}
Expected result:
----------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
NULL
PHP Warning: oci_close() expects parameter 1 to be resource, null
given
NULL
Actual result:
--------------
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
resource(8) of type (oci8 connection)
NULL
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39352&edit=1[/url]
iliaa@php.net Guest



Reply With Quote

