php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25267 cli php segv with ibase_close()
Submitted: 2003-08-27 04:02 UTC Modified: 2003-08-27 12:26 UTC
From: mzieba at medianet dot pl Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.3.3 OS: Linux 2.4.18-27.8.0 (Redhat)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 34 = ?
Subscribe to this entry?

 
 [2003-08-27 04:02 UTC] mzieba at medianet dot pl
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);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-27 11:08 UTC] sniper@php.net
I deleted all the comments as they didn't have any useful info in them. Now, try this configure line:

# rm config.cache 
# ./configure --disable-all --disable-cgi --enable-debug --with-interbase
# make clean && make

Then run your script like this:

# sapi/cli/php -n yourscript.php

If it crashes:

# gdb sapi/cli/php
(gdb) run -n yourscript.php

 [2003-08-27 12:26 UTC] mzieba at medianet dot pl
Thanks for your hint.

I did that, no segv. 
No SEGV with my whole previous configure without shared modules only.
It works ok.

I'll reopen this bug, if I only will be able to find the cause of that SEGV. 
thanks for help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC