ID:               37937
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ibexris at gmail dot com
-Status:           Assigned
+Status:           Bogus
 Bug Type:         MySQLi related
 Operating System: linux, fedora core 5
 PHP Version:      5.1.4
 Assigned To:      georg
 New Comment:

mysqli_bind_result has to be called after mysqli_stmt_execute, not
before.

        $stmt = $mysql->prepare("SELECT CONCAT('xxx', ?, 'xxx') FROM DUAL");
        $stmt->bind_param('s', $a);
        $a = "abc";

        $stmt->execute();
        $stmt->bind_result($concat);

        $stmt->fetch();
        var_dump($concat);

Result:
string(9) "xxxabcxxx"



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

[2006-06-27 21:08:43] ibexris at gmail dot com

Not sure what else it could be.  The mysql logs clearly show the
correct queries going in, and when you run them in the client, they
produce correct results.  It *only* happens with bound parameters,
crosses several versions of php and mysql (forgot to mention that I
started with 5.0.14), and is present on at least two different systems
(fc4 + official mysql packages, and fc5 with distro-supplied packages).
 The fact that part of my browser useragent came back in one of the
results makes it pretty clear that php is at least somehow involved.

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

[2006-06-27 21:03:32] [EMAIL PROTECTED]

Doesn't look like PHP problem to me, but I'm assigning it to the
maintainer.

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

[2006-06-27 20:58:45] ibexris at gmail dot com

5.0.22.  Also, my main machine is running php 5.0.4, but I replicated
it on another machine with 5.1.4 before submitting the bug (same
version of mysql).

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

[2006-06-27 20:56:20] [EMAIL PROTECTED]

Please also tell the version of MySQL you're using.

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

[2006-06-27 20:54:35] ibexris at gmail dot com

Still more info..  added a web page to test it (sorry, internal network
only) and added a bunch more x's to the concat stuff..  Getting all
kinds of interesting stuff that seems to indicate a corrupt memory
fragment.  The key being that one time I got "d.8.0.4) Gecko/20060609
Firefox/1.5.0." stuffed away in the response string.

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

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/37937

-- 
Edit this bug report at http://bugs.php.net/?id=37937&edit=1

Reply via email to