#33772 [Opn->Asn]: __destruct is run too early (session_save_handler)
| From: | edink@php.net | Date: | Tue, 13 Sep 2005 09:16:11 +0000 |
| Subject: | #33772 [Opn->Asn]: __destruct is run too early (session_save_handler) | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969370113@lists.php.net to get a copy of this message | ||
ID: 33772
Updated by: edink@php.net
Reported By: msipria at suomi24 dot fi
-Status: Open
+Status: Assigned
Bug Type: Documentation problem
Operating System: *
PHP Version: 5CVS-2005-07-19
-Assigned To:
+Assigned To: sniper
Previous Comments:
------------------------------------------------------------------------
[2005-09-10 12:34:54] zulan at zulan dot net
If this is the egg, the chicken is:
http://bugs.php.net/bug.php?id=27555
Is there a way to make it ini_set-able if objects->__destruct or
sess_write_close first?
------------------------------------------------------------------------
[2005-09-09 22:01:22] earnest dot berry at gmail dot com
I also am having the issue. I'm using 5.1.0b3 with mysql 4.1.13a-nt.
Will this be fixed in the next relase of PHP?
------------------------------------------------------------------------
[2005-09-09 21:56:34] tss24 at cornell dot edu
Experiencing the same exact problem with PHP 5.0.5 and MySQL 4.1.11
Was this a new bug with PHP 5.0.5 / 5.1.x?
------------------------------------------------------------------------
[2005-08-24 23:58:03] webmaster at vintagegaming dot org
I want to enter this as a new bug report but I expect it would be
kicked out as a duplicate of 33635, which links to this bug. This
seems related in that something has changed so that my mysqli link is
closed before the shutdown_function is executed.
The following code works in all php5 versions before 5.1beta3.
<?php
function shutdown()
{
global $link;
echo mysqli_real_escape_string($link, 'foo');
}
$servername = 'localhost';
$username = 'username';
$password = 'password';
$link = mysqli_init();
mysqli_real_connect($link, $servername, $username, $password);
echo mysqli_real_escape_string($link, 'foo') . '<br />';
register_shutdown_function('shutdown');
?>
Expected Result:
foo
foo
Actual Result:
foo
Warning: Couldn't fetch mysqli in c:\program files\apache
group\Apache\htdocs\foo.php on line 7
and to further this annoying issue, why is it that the equivalent mysql
function still works in 5.1b3?
<?php
function shutdown()
{
global $link;
echo mysql_real_escape_string('foo', $link);
}
$servername = 'localhost';
$username = 'username';
$password = 'password';
$link = mysql_connect($servername, $username, $password);
echo mysql_real_escape_string('foo', $link) . '<br />';
register_shutdown_function('shutdown');
?>
Expected Result:
foo
foo
Actual Result:
foo
foo
------------------------------------------------------------------------
[2005-08-23 03:03:36] sniper@php.net
Reclassified as documentation issue.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/33772
--
Edit this bug report at http://bugs.php.net/?id=33772&edit=1