|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-16 17:30 UTC] mike@php.net
[2006-09-16 17:44 UTC] thbley at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ MySQLi connection is broken when using a custom session handler. When using MySQL extension there is no problem. Reproduce code: --------------- <?php $GLOBALS["DB"] = mysqli_connect("localhost","root",""); session_set_save_handler("_login_session_none","_login_session_none","_login_session_none","_login_session_write","_login_session_none","_login_session_none"); session_start(); echo mysqli_query($GLOBALS["DB"],"show status")."OK\n"; function _login_session_none($param1="", $param2="") { return true; } function _login_session_write($id,$val) { echo mysqli_query($GLOBALS["DB"],"show status"); } ?> Expected result: ---------------- Object id #2OK Object id #2O Actual result: -------------- Object id #2OK Warning: mysqli_query() [function.mysqli-query]: Couldn't fetch mysqli in H:\sgs\src\test_mysqli.php on line 14