ID:               46997
 User updated by:  dangerousdave86 at hotmail dot com
 Reported By:      dangerousdave86 at hotmail dot com
-Status:           No Feedback
+Status:           Open
 Bug Type:         MySQLi related
 Operating System: Windows Server 2008 Std ISAPI
 PHP Version:      5.2.8
 New Comment:

Reopening


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

[2009-02-04 21:09:59] dangerousdave86 at hotmail dot com

Replication Code:
<?php
# Connect to DB
$db = mysqli_connect('localhost','root','','');
$res = mysqli_query($db, 'CREATE TEMPORARY TABLE tst1 (c1 VARCHAR(8),
c2 VARCHAR(8))');
$res = mysqli_query($db, 'INSERT INTO tst1 (c1, c2) VALUES ("aa","bb"),
("cc","dd")');
$res = mysqli_query($db, 'SELECT * FROM tst1');
$data = mysqli_fetch_assoc($res);
var_dump($data);
?>
Never reaches VAR_DUMP(); Errors on MYSQLI_FETCH_ASSOC(); PHP has
encountered an Access Violation at 004B2BEB

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

[2009-01-13 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2009-01-11 14:01:50] allan at malwis dot dk

I have the error when trying to fetch more then one column.

Environment:
OS: WIN XP PRO 5.1.2600 SP3
PHP: 5.2.8
MySql: 5.1.30-community
Webserver: IIS 5.1

Only SQL statement and echo line is different in the 3 examples.
_________________________________________
//This works:
<Html>
<Body>
<?php

$con = mysqli_connect("localhost","XXXX","XXXX");
$con->select_db("XXXX");

$query = 'SELECT name FROM items';
$result = $con->query($query);
$row = $result->fetch_array(MYSQLI_ASSOC);
echo $row["name"];

$con->close();

 ?>
 </Body>
 </Html>
_________________________________________
//This works:

<Html>
<Body>
<?php

$con = mysqli_connect("localhost","XXXX","XXXX");
$con->select_db("XXXX");

$query = 'SELECT itemid FROM items';
$result = $con->query($query);
$row = $result->fetch_array(MYSQLI_ASSOC);
echo $row["itemid"];

$con->close();

 ?>
 </Body>
 </Html>
_________________________________________
//This fails:

<Html>
<Body>
<?php

$con = mysqli_connect("localhost","XXXX","XXXX");
$con->select_db("XXXX");

$query = 'SELECT itemid, name FROM items';
$result = $con->query($query);
$row = $result->fetch_array(MYSQLI_ASSOC);
//This line gives PHP has encountered an Access Violation at 00FA2BEB
echo $row["itemid"];

$con->close();

 ?>
 </Body>
 </Html>
_________________________________________

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

[2009-01-05 11:54:15] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



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

[2009-01-03 13:58:33] dangerousdave86 at hotmail dot com

Description:
------------
Error: PHP has encountered an Access Violation at 00322BEB When calling
mysqli_fetch_assoc or mysqli_fetch_object on mysqli result. Also occurs
using OO method.

Error does not occur when using mysqli_fetch_row. Result is correct and
indexed numerically in array.

Reproduce code:
---------------
Any database query using mysql that fetches rows using
mysql_fetch_object, _fetch_assoc, _fetch_array. Or OO equivilents.

Expected result:
----------------
an array representing a row from the database

Actual result:
--------------
Access Violation


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


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

Reply via email to