ID: 33635 Updated by: [EMAIL PROTECTED] Reported By: tony at marston-home dot demon dot co dot uk -Status: Assigned +Status: Bogus Bug Type: MySQLi related Operating System: Windows XP PHP Version: 5CVS-2005-07-10 (dev) Assigned To: georg New Comment:
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #33772 which has a nice and short script that demonstrates the same issue. (it's not Mysqli only issue after all) Previous Comments: ------------------------------------------------------------------------ [2005-07-15 09:41:17] tony at marston-home dot demon dot co dot uk This problem only occurs when writing out session data to a database when the script terminates, and also because I am using a shared database connection (the one created when the session data was forst read in). I conducted a little experiment by replacing the exit function with session_write_close(), and this did not produce the error. I therefore strongly suspect that the order of events at script termination has been altered to: (a) close all resources (b) write session data (to database) This will fail if (b) uses a resource closed in (a) ------------------------------------------------------------------------ [2005-07-12 01:08:12] [EMAIL PROTECTED] Assigned to the author of the extension, who can propably explain this better.. ------------------------------------------------------------------------ [2005-07-11 23:55:55] tony at marston-home dot demon dot co dot uk You are completely mistaken. I am not mixing both OO and procedural ways of accessing the DB - all my calls to the mysqli_* functions are in the procedural style. The fact that I am making these calls inside my own OO class should be totally irrelevant. The same code has worked perfectly through php 5.0.0 to 5.0.4, and with 5.0.5-dev only fails when I try to write my session data to the database. SOMETHING HAS BEEN INTRODUCED IN 5.0.5-dev THAT CAUSES THIS FAILURE. My use of static variables follows the documentation for the singleton pattern at http://www.php.net/manual/en/language.oop5.patterns.php. It allows to to call mysqli_connect() only once for a request. ------------------------------------------------------------------------ [2005-07-11 22:48:09] [EMAIL PROTECTED] Please read the friendly manual about Mysqli. You're trying to mix both OO and procedural way of accessing the DB. Choose one and stick to that. (And I don't get the idea of making the connection 'static' either..especially if you deal with OOP) ------------------------------------------------------------------------ [2005-07-11 12:33:45] tony at marston-home dot demon dot co dot uk Whoops. That URL should be http://www.tonymarston.net/test.zip ------------------------------------------------------------------------ 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/33635 -- Edit this bug report at http://bugs.php.net/?id=33635&edit=1
