php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24399 PEAR DB isError crash [instanceof_function fault?]
Submitted: 2003-06-30 02:18 UTC Modified: 2004-06-29 23:04 UTC
From: mattmichalowski at hotmail dot com Assigned:
Status: Closed Package: PEAR related
PHP Version: 5.0.0b1 (beta1) OS: Linux (i686 2.2.15)
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: mattmichalowski at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-06-30 02:18 UTC] mattmichalowski at hotmail dot com
Description:
------------
A simple PEAR DB test script causes a segfault. 

My configure line:
./configure' '--prefix=/home/mattm/local/php5-apache' '--with-apache=../apache_1.3.27' '--with-pgsql=/usr' '--with-gd=/home/mattm/local/php5-apache' '--with-freetype-dir=/home/mattm/local/php5-apache' '--with-jpeg-dir=/usr' '--enable-calendar' '--with-libxml-dir=/home/mattm/local/php5-apache' '--without-simplexml' '--enable-debug'



Reproduce code:
---------------
<?php
error_reporting(E_ALL);
require_once 'DB.php';

$db = Db::connect('pgsql://postgres:@127.0.0.1/mattm', false);
if (Db::isError($db))
{
    die($db->getMessage());
}

$res = $db->query("SELECT * FROM employee");
if (Db::isError($res))
{
    die($res->getMessage());
}

?>


Expected result:
----------------
no output, but shouldn't segfault

Actual result:
--------------
(gdb) bt
#0  0x80b64c8 in instanceof_function ()
#1  0x80c3399 in zend_startup_builtin_functions ()
#2  0x80c3404 in zend_startup_builtin_functions ()
#3  0x80d006f in zend_do_fcall_common_helper ()
#4  0x80d06a6 in zend_do_fcall_handler ()
#5  0x80cbb9b in execute ()
#6  0x80d01dd in zend_do_fcall_common_helper ()
#7  0x80d05aa in zend_do_fcall_by_name_handler ()
#8  0x80cbb9b in execute ()
#9  0x80b9979 in zend_execute_scripts ()
#10 0x8087fd3 in php_execute_script ()
#11 0x80d625a in apache_php_module_main ()
#12 0x807e1d6 in ap_get_server_built ()
#13 0x807e232 in ap_get_server_built ()
#14 0x81efa69 in ap_invoke_handler ()
#15 0x820560f in ap_some_auth_required ()
#16 0x8205676 in ap_process_request ()
#17 0x81fbf16 in ap_child_terminate ()
#18 0x81fc0d1 in ap_child_terminate ()
#19 0x81fc24c in ap_child_terminate ()
#20 0x81fc8dd in ap_child_terminate ()
#21 0x81fd14c in main ()
#22 0x4033165f in __libc_start_main () from /lib/libc.so.6


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 14:17 UTC] sterling@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Thanks!
 [2004-06-29 22:33 UTC] fep at cs dot uiuc dot edu
Having a problem with PHP5 RC3 experiencing a segmentation fault that is very similar to this reported bug fixed last year.  A simple PEAR DB test script causes a segfault.  Our environment is very similar to the one listed below except we are using an Oracle database client against an Oracle 10G database server.
 [2004-06-29 23:04 UTC] danielc@php.net
In response to the comment by <fep at cs dot uiuc dot edu> on  2004-06-29:

This isn't really PEAR or PEAR DB related.  The crash is due to a PHP bug.  FYI, I'm not experiencing crashes.  Here's my config:

PHP: 5.0.0-dev (cli) (built: Jun 28 2004 16:29:27)
DB: 1.6.4
PEAR: 1.3.1
OS: Windows 2000
Oracle: 9.2

So, upgrade everything and see what happens.  If you're still crashing, open up a new PHP bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC