From:             tmiller at web-1hosting dot net
Operating system: Linux-2.4.20
PHP version:      4.3.2
PHP Bug Type:     Reproducible crash
Bug description:  mysql_info() causes segfault

Description:
------------
When using mysql_info() whithin a class if the link identifier is passed
using $this->connection_id php will crash.  This happens both with apache
module and using CLI.

Reproduce code:
---------------
Code may be found at:

http://php.web-1hosting.net/bugs/mysql_info_crash.html

Expected result:
----------------
I expect to see the string "here: Rows matched: 1 Changed: 0 Warnings: 0"
on the screen/webpage.

Actual result:
--------------
[EMAIL PROTECTED]:~/Developement/htdocs$ ./mysql.php 
Segmentation fault (core dumped)
[EMAIL PROTECTED]:~/Developement/htdocs$ gdb /usr/bin/php core
(gdb) bt
#0  0x08152672 in zend_fetch_resource (passed_id=0x4, default_id=-1, 
    resource_type_name=0x4001dc53 "MySQL-Link", found_resource_type=0x0, 
    num_resource_types=2) at
/home/tmiller/Php/php-4.3.2/Zend/zend_list.c:123
#1  0x40019bf9 in zif_mysql_info () from /usr/lib/php/extensions/mysql.so
#2  0x08159c7a in execute (op_array=0x8232be4)
    at /home/tmiller/Php/php-4.3.2/Zend/zend_execute.c:1606
#3  0x08159a1b in execute (op_array=0x822cfe4)
    at /home/tmiller/Php/php-4.3.2/Zend/zend_execute.c:1650
#4  0x0814d4fb in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/tmiller/Php/php-4.3.2/Zend/zend.c:869
#5  0x0812787f in php_execute_script (primary_file=0xbffff820)
    at /home/tmiller/Php/php-4.3.2/main/main.c:1671
#6  0x0815e788 in main (argc=3, argv=0xbffff8b4)
    at /home/tmiller/Php/php-4.3.2/sapi/cli/php_cli.c:806
#7  0x4033bbb4 in __libc_start_main () from /lib/libc.so.6


-- 
Edit bug report at http://bugs.php.net/?id=24181&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24181&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24181&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24181&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24181&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24181&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24181&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24181&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24181&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24181&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24181&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24181&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24181&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24181&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24181&r=gnused

Reply via email to