ID: 47950 Updated by: j...@php.net -Summary: new MySQLi functions not available as class methods Reported By: werner at procurios dot nl -Status: Open +Status: Assigned Bug Type: MySQLi related -Operating System: os x 10.5 +Operating System: * -PHP Version: 5.3.0RC1 +PHP Version: 5.3CVS, 6CVS (2009-04-13) -Assigned To: +Assigned To: mysql New Comment:
The test script is very flawed, for one it does not enclose strings in quotes and also uses wrong method names.. The correct methods that do exist: http://www.php.net/manual/en/mysqli-result.fetch-all.php http://www.php.net/manual/en/mysqli.get-connection-stats.php These really DO NOT exist as methods: http://www.php.net/manual/en/mysqli.get-cache-stats.php http://www.php.net/manual/en/mysqli.get-client-stats.php Previous Comments: ------------------------------------------------------------------------ [2009-04-11 12:52:30] werner at procurios dot nl Description: ------------ While experimenting with the new MySQli functions enabled by compiling with the mysqlnd driver I encountered a problem with the OO MySQLi interface. I can call the new functions, but contrary to the documentation they dont seem to be available as class methods on a mysqli object. The only relevant info i could find was this message: http://lists.mysql.com/commits/21812 full configure string: ./configure --prefix=/usr/local/php --with-apxs2 --with-openssl --enable-bcmath --enable-mbstring --with-curl --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-soap --enable-zip --with-pear=/usr/local/pear --with-zlib --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --with-gd --with-mcrypt=/usr/local/lib --with-tidy=/usr/local Reproduce code: --------------- <?php $mysqli = new mysqli(); if (function_exists(mysqli_fetch_all) && !method_exists($mysqli, 'fetch_all')) { echo 'mysqli_fetch_all not a class method <br />'; } if (function_exists(mysqli_get_cache_stats) && !method_exists($mysqli, 'mysqli_get_cache_stats')) { echo 'mysqli_get_cache_stats not a class method <br />'; } if (function_exists(mysqli_get_client_stats) && !method_exists($mysqli, 'mysqli_get_client_stats')) { echo 'mysqli_get_client_stats not a class method <br />'; } if (function_exists(mysqli_get_connection_stats) && !method_exists($mysqli, 'mysqli_get_connection_stats')) { echo 'mysqli_get_connection_stats not a class method <br />'; } ?> Expected result: ---------------- no output expected Actual result: -------------- mysqli_fetch_all not a class method mysqli_get_cache_stats not a class method mysqli_get_client_stats not a class method mysqli_get_connection_stats not a class method ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47950&edit=1