From:             mzieba at medianet dot pl
Operating system: Linux 2.4.18-27.8.0 (Redhat)
PHP version:      4.3.3
PHP Bug Type:     InterBase related
Bug description:  cli php segv with ibase_close()

Description:
------------
I'm not sure, if it's the same bug as closed 22056 or 7014, but I've got
SEGV on ibase_close() with php 4.3.3.

Warnings are ok, I know, that these links are not valid.

httpd (Apache) 2.0.47

/usr/local/php4/bin/php -v 
PHP 4.3.3 (cli) (built: Aug 27 2003 09:47:50)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

gcc version 3.2.3 20030422 (Red Hat Linux 3.2.3-4)998-2003 

and configure:
./configure --prefix=/usr/local/php4 --with-apxs2 \
        --enable-track-vars --enable-debug \
        --with-xml=shared \
        --cache-file=../config.cache \
        --enable-force-cgi-redirect \
        --disable-debug \
        --enable-pic \
        --disable-rpath \
        --enable-inline-optimization \
        --with-bz2 \
        --with-curl \
        --with-gd \
        --enable-gd-native-ttf \
        --with-ttf \
        --with-gdbm \
        --with-gettext \
        --with-ncurses \
        --with-gmp \
        --with-iconv \
        --with-openssl \
        --with-png \
        --with-pspell \
        --with-regex=system \
        --with-xml \
        --with-zlib \
        --with-layout=GNU \
        --enable-bcmath \
        --enable-exif \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-safe-mode \
        --enable-sockets \
        --enable-sysvsem \
        --enable-sysvshm \
        --enable-discard-path \
        --enable-track-vars \
        --enable-trans-sid \
        --enable-yp \
        --enable-wddx \
        --without-oci8 \
        --with-pear=/usr/share/pear \
        --with-imap=shared \
        --with-imap-ssl \
        --with-kerberos \
        --with-ldap=shared \
        --with-mysql=shared \
        --with-mssql=shared \
        --with-pgsql=shared \
        --with-unixODBC=shared \
        --enable-memory-limit \
        --enable-bcmath \
        --enable-shmop \
        --enable-versioning \
        --enable-calendar \
        --enable-dbx \
        --enable-dio \
        --enable-mcal \
        --with-interbase=shared \
        --enable-mbstring --enable-mbstr-enc-trans \
        --enable-mbregex 


Hope, this will help, in some way. ;-)


Reproduce code:
---------------
<?php
    $host = 'example.com';
    $dbh = ibase_connect($host, 'SYSDBA', 'masterkey');
    ibase_close($dbh);
?>

Expected result:
----------------
PHP Warning:  ibase_connect(): I/O error for file "example.com" Error
while trying to open file No such file or directory  in
/home/baza/www/ib.php on line 3

PHP Warning:  ibase_close(): 0 is not a valid InterBase link resource in
/home/baza/www/ib.php on line 4



Actual result:
--------------
Warnings above + 
Segmentation fault (core dumped)

backtrace:
(gdb) bt
#0  0x40a0bd00 in ?? ()
#1  0x081a454c in main (argc=4, argv=0xbfffdd94) at
/tmp/php/php-4.3.3/sapi/cli/php_cli.c:882
#2  0x401554ed in __libc_start_main () from /lib/libc.so.6
(gdb) fr 1
#1  0x081a454c in main (argc=4, argv=0xbfffdd94) at
/tmp/php/php-4.3.3/sapi/cli/php_cli.c:882
882             exit(exit_status);

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

Reply via email to