ID:               48821
 Updated by:       [email protected]
 Reported By:      margus at zone dot ee
-Status:           Open
+Status:           Feedback
 Bug Type:         MySQL related
 Operating System: CentOS 4.7/x86_64
 PHP Version:      5.3.0
 New Comment:

What was the full configure line used to compile PHP?


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

[2009-07-06 16:59:02] margus at zone dot ee

Description:
------------
mysql_fetch_assoc/mysql_fetch_array will segfault PHP if second
parameter (MYSQL_BOTH, MYSQL_ASSOC or MYSQL_NUM) is specified.

The value of parameter does'nt make any difference.

This happens only for PHP-CGI and Apache module and strangely not to
CLI.

Reproduce code:
---------------
<?php

mysql_connect ("localhost", "user", "password");
mysql_select_db ("test");

$r = mysql_query ("SELECT * FROM users");

print_r (mysql_fetch_assoc ($r, MYSQL_BOTH));

?>

Expected result:
----------------
Array
(
    [id] => 1
    [username] => asd1
    [email] => asd2
    [asd] => 2000
)

Actual result:
--------------
Segmentation fault


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


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

Reply via email to