ID:               33635
 User updated by:  tony at marston-home dot demon dot co dot uk
 Reported By:      tony at marston-home dot demon dot co dot uk
-Status:           Bogus
+Status:           Open
 Bug Type:         MySQLi related
 Operating System: Windows XP
 PHP Version:      5CVS-2005-07-10 (dev)
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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

------------------------------------------------------------------------

[2005-07-11 11:59:48] tony at marston-home dot demon dot co dot uk

I have changed the test set as follows:
(a) Everything is in a single file (test.php)
(b) I have removed the PHP 4 code (=& with objects)
(c) I have removed redundant methods.

New test set is available at http://www.tonymarston.net/text.zip

------------------------------------------------------------------------

[2005-07-11 09:09:47] [EMAIL PROTECTED]

1. Put everything in single file
2. Remove the PHP4 stuff (in PHP5, you don't need to do =& with
objects, for example)
3. Remove all unused methods


------------------------------------------------------------------------

[2005-07-11 00:12:34] tony at marston-home dot demon dot co dot uk

php_session class is a subclass of std.table class, so i suppose they
could be combined, but it still wouldn't reduce the total code. It is
the interaction between the table class and the mysql class which
appears to be causing the problem.

The point is that the line where it fails is executed without error
several times before the failure occurs. If I remove the custom session
handler the code never fails. It does not fail when reading the session
data, only when writing.

------------------------------------------------------------------------

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

Reply via email to