From:             ben at skiddle dot com
Operating system: FreeBSD 5.3
PHP version:      4.4.0
PHP Bug Type:     Reproducible crash
Bug description:  crashes on mysql_query etc

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


-- 
Edit bug report at http://bugs.php.net/?id=34914&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34914&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34914&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34914&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34914&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34914&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34914&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34914&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34914&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34914&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34914&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34914&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34914&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34914&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34914&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34914&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34914&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34914&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34914&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34914&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34914&r=mysqlcfg

Reply via email to