ID: 29667
Comment by: ghostfacekillaz at gmx dot net
Reported By: yrob at mail dot crpower dot com
Status: Open
Bug Type: MySQL related
Operating System: Linux 2.6.5-7.104-default
PHP Version: 5.0.1
New Comment:
Description:
------------
I'm using MySQL 4.1.3-beta
For me the mysqli functions work.
There's just a different behavior I found between PHP 5.0.0 and PHP
5.0.1 in function mysqli_fetch_array
Example:
--------
SQL-Statement: SHOW TABLES FROM databasename
mysqli_fetch_array (PHP 5.0.0) returns:
[0] = tablename
mysqli_fetch_array (PHP 5.0.1) returns:
[Tables_in_databasename] = tablename
Previous Comments:
------------------------------------------------------------------------
[2004-08-14 00:26:27] yrob at mail dot crpower dot com
Description:
------------
I'm using MySQL 5.0.1.
The main problem here is that now the mysqli functions don't work.
Configuration, make, and make install run just fine. When I try to load
a web page, nothing displays (displayed just fine using PHP 5.0.0).
When I use the CLI on PHP 5.0.1 to test the web page, it seems to run
just fine.
Had to go back to PHP 5.0.0 so my mysqli functions will work.
The other problem is that I wasn't able to get mysql functions to work
at all. It wouldn't even pass configuration
"--with-mysql=/usr/lib/mysql". Configuration said it couldn't find
libmysql, though I pointed it directly to the MySQL 5.0.1 library
directory.
Reproduce code:
---------------
$db = new mysqli( 'dbhost', 'username', 'pw');
if (!$db) { printf("Connect failed: %s\n", mysqli_connect_error());
exit(); }
$db->select_db("dbname");
$sql = "SELECT * FROM test";
$select = $db->query( $sql );
$result = $select->fetch_array(MYSQLI_BOTH);
$something = $result['something'];
Expected result:
----------------
Loaded web page.
Actual result:
--------------
Web page does not load, but the CLI runs just fine.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29667&edit=1