php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34914 crashes on mysql_query etc
Submitted: 2005-10-19 10:20 UTC Modified: 2005-10-27 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ben at skiddle dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.4.0 OS: FreeBSD 5.3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-10-19 10:20 UTC] ben at skiddle dot com
Description:
------------
When running mysql functions with PHP 4.4.0 and Mysql 4.1.7, PHP will crash and core dump

Reproduce code:
---------------
$server = "localhost";
$connection_link = mysql_connect($server,"scossa","Fj43sK");
mysql_select_db("scossa");


$sql = "SELECT * FROM config_user_login INNER JOIN config_user_login_categories ON config_user_login.category_id = config_user_login_categories.category_id WHERE username ='$username' AND password ='$password' AND status = 1";

$RS_query = mysql_query($sql);

$arr = mysql_fetch_assoc($RS_query);


Expected result:
----------------
No crash

Actual result:
--------------
#0  0x28728acb in memcpy () from /lib/libc.so.5
#1  0x081a82cd in cli_read_rows ()
#2  0x081a8bbd in cli_read_query_result ()
#3  0x081a8d78 in mysql_real_query ()
#4  0x080c752c in php_mysql_do_query_general (query=0x84a660c, 
    mysql_link=0xfd010000, link_id=2, db=0x0, use_store=1, 
    return_value=0x84b23ec)
    at /home/voodoo/php-4.4.0/ext/mysql/php_mysql.c:1264
#5  0x080c7905 in php_mysql_do_query (ht=139191379, return_value=0x84b23ec, 
    this_ptr=0x0, return_value_used=1, use_store=1)
    at /home/voodoo/php-4.4.0/ext/mysql/php_mysql.c:1330
#6  0x0818709e in execute (op_array=0x84aaf0c)
    at /home/voodoo/php-4.4.0/Zend/zend_execute.c:1672
#7  0x081760bb in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/voodoo/php-4.4.0/Zend/zend.c:938
#8  0x0814e9b0 in php_execute_script (primary_file=0xbfbfe860)
    at /home/voodoo/php-4.4.0/main/main.c:1751
#9  0x0818e8a0 in main (argc=1, argv=0xbfbfe8e0)
    at /home/voodoo/php-4.4.0/sapi/cgi/cgi_main.c:1606


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-19 11:36 UTC] tony2001@php.net
Please see if valgrind tells you something about it.

 [2005-10-19 11:37 UTC] tony2001@php.net
And updated MySQL to the latest one (4.1.14) first.
 [2005-10-27 01:00 UTC] 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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 09:01:33 2024 UTC