#25882 [NEW]: PEAR DB isError crash
| From: | reiersol at online dot no | Date: | Wed, 15 Oct 2003 14:06:12 +0000 |
| Subject: | #25882 [NEW]: PEAR DB isError crash | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-22705@lists.php.net to get a copy of this message | ||
From: reiersol at online dot no
Operating system: Linux RedHat 9.0
PHP version: 5CVS-2003-10-15 (dev)
PHP Bug Type: PEAR related
Bug description: PEAR DB isError crash
Description:
------------
The outward symptom is the same as bug #24399: PHP5 crashes when running
DB:isError. The test script is the same except it's mysql rather than
pgsql, and the table has a different name.
The configure command as listed in the makefile is:
'./configure' '--with-mysql=/usr/local/mysql'
'--with-mysql-sock=/var/lib/mysql/mysql.sock'
'--prefix=/home/dagfinn/php5/' '--enable-debug'
However, php -i for some reason lists only the --prefix option
Reproduce code:
---------------
require_once 'DB.php';
$db = Db::connect('mysql://me:mypasswd@localhost/mydb', false);
if (Db::isError($db))
{
die($db->getMessage());
}
$res = $db->query("SELECT * FROM Users");
if (Db::isError($res))
{
die($res->getMessage());
}
Expected result:
----------------
No output
Actual result:
--------------
(gdb) bt
#0 instanceof_function (instance_ce=0x0, ce=0x82d9a5c)
at /home/dagfinn/downloads/php-5.0.0b1/Zend/zend_operators.c:1434
#1 0x08141308 in is_a_impl (ht=2, return_value=0x82d9a5c, this_ptr=0x0,
return_value_used=1, only_subclass=1 '\001')
at
/home/dagfinn/downloads/php-5.0.0b1/Zend/zend_builtin_functions.c:623
#2 0x081413b5 in zif_is_subclass_of (ht=2, return_value=0x82d9a5c,
this_ptr=0x0, return_value_used=1)
at
/home/dagfinn/downloads/php-5.0.0b1/Zend/zend_builtin_functions.c:640
#3 0x0814b09f in zend_do_fcall_common_helper (execute_data=0xbfffcf00,
op_array=0x822be7c)
at /home/dagfinn/downloads/php-5.0.0b1/Zend/zend_execute.c:2606
#4 0x08147f57 in execute (op_array=0x822be7c)
at /home/dagfinn/downloads/php-5.0.0b1/Zend/zend_execute.c:1254
#5 0x0814af1e in zend_do_fcall_common_helper (execute_data=0xbfffd390,
op_array=0x821ba14)
at /home/dagfinn/downloads/php-5.0.0b1/Zend/zend_execute.c:2635
#6 0x08147f57 in execute (op_array=0x821ba14)
at /home/dagfinn/downloads/php-5.0.0b1/Zend/zend_execute.c:1254
#7 0x0813acc3 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/dagfinn/downloads/php-5.0.0b1/Zend/zend.c:1017
#8 0x08113b67 in php_execute_script (primary_file=0xbffff720)
at /home/dagfinn/downloads/php-5.0.0b1/main/main.c:1695
#9 0x08150afd in main (argc=2, argv=0xbffff7a4)
at /home/dagfinn/downloads/php-5.0.0b1/sapi/cgi/cgi_main.c:1534
#10 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
--
Edit bug report at http://bugs.php.net/?id=25882&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25882&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25882&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25882&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25882&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25882&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25882&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25882&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25882&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25882&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25882&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25882&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25882&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25882&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25882&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25882&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25882&r=float