#25882 [Opn->Dup]: PEAR DB isError crash
| From: | reiersol at online dot no | Date: | Thu, 16 Oct 2003 04:55:35 +0000 |
| Subject: | #25882 [Opn->Dup]: PEAR DB isError crash | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22720@lists.php.net to get a copy of this message | ||
ID: 25882
User updated by: reiersol at online dot no
Reported By: reiersol at online dot no
-Status: Open
+Status: Duplicate
Bug Type: PEAR related
Operating System: Linux RedHat 9.0
-PHP Version: 5CVS-2003-10-15 (dev)
+PHP Version: 5.0.0b1 (beta1)
New Comment:
I reported this bug thinking I had the latest CVS snapshot and then
realized I had built PHP from the wrong directory. So I was running the
beta1 version and it's a duplicate of bug #24399. Sorry.
Previous Comments:
------------------------------------------------------------------------
[2003-10-15 10:06:11] reiersol at online dot no
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 this bug report at http://bugs.php.net/?id=25882&edit=1