php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25882 PEAR DB isError crash
Submitted: 2003-10-15 10:06 UTC Modified: 2003-10-28 16:31 UTC
From: reiersol at online dot no Assigned:
Status: Closed Package: PEAR related
PHP Version: 5.0.0b1 (beta1) OS: Linux RedHat 9.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: reiersol at online dot no
New email:
PHP Version: OS:

 

 [2003-10-15 10:06 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-16 00:55 UTC] reiersol at online dot no
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 11:01:36 2025 UTC