|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15419 ibase_close problem
Submitted: 2002-02-07 02:55 UTC Modified: 2002-04-04 03:09 UTC
Avg. Score:2.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: p dot grabowski at firma dot 2p dot pl Assigned: daniela (profile)
Status: Closed Package: InterBase related
PHP Version: 4.1.1 OS: linux red hat
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: p dot grabowski at firma dot 2p dot pl
New email:
PHP Version: OS:


 [2002-02-07 02:55 UTC] p dot grabowski at firma dot 2p dot pl
ibase_close($dbc1); // here is a bug

'./configure' '--prefix=/usr/local/php4.1.1/' '--enable-track-vars' '--enable-trans-sid' '--with-mysql' '--disable-debug' '--with-apxs=/usr/local/apache-local/bin/apxs' '--enable-shmop' '--enable-xml' '--enable-sockets' '--with-gd' '--with-interbase=/opt/interbase/'

Any command after ibase_close doesn't execute and apache returns 404 return code 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-07 03:17 UTC]
Can look up in your apache log if you get a segfault or some similar crash, and if so can you please provide a backtrace ( ?
 [2002-02-14 06:52 UTC] markus at colorplaza dot com
We experienced this same bug. I tested it in RH 7.2 with IB 6.
We run the same script from command line and got: Segmentation fault

when I comment ibase_close($db) out the script works fine.
 [2002-03-08 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-03-12 14:00 UTC] haystd at myrealbox dot com
I can reproduce this as well. All is fine if the ibase_close call is removed. It is a "Segmentation Fault" according to the Apache error_log. (Could this be related to BUG 15940?) Here is the debugging info:

Program received signal SIGSEGV, Segmentation fault.
0x4019c07c in memcpy () from /lib/i686/

#0  0x4019c07c in memcpy () from /lib/i686/
#1  0x00000018 in ?? ()
#2  0x4003e564 in gds__msg_format () from /opt/interbase/lib/
#3  0x4003e1c8 in gds__interprete () from /opt/interbase/lib/
#4  0x40038ab3 in isc_interprete () from /opt/interbase/lib/
#5  0x0808315a in _php_ibase_error () at interbase.c:268
#6  0x08083477 in _php_ibase_free_result (rsrc=0x82151a4) at interbase.c:388
#7  0x081214f7 in list_entry_destructor (ptr=0x82151a4) at zend_list.c:177
#8  0x0811f775 in zend_hash_del_key_or_index (ht=0x81c8e64, arKey=0x0,
    nKeyLength=0, h=2, flag=1) at zend_hash.c:512
#9  0x08121281 in _zend_list_delete (id=2) at zend_list.c:56
#10 0x0811906d in _zval_dtor (zvalue=0x8215164,
    __zend_filename=0x8191cdc "zend_execute_API.c", __zend_lineno=274)
    at zend_variables.c:64
#11 0x08110e4a in _zval_ptr_dtor (zval_ptr=0x8215910,
    __zend_filename=0x81925b3 "zend_variables.c", __zend_lineno=192)
    at zend_execute_API.c:274
#12 0x0811939f in _zval_ptr_dtor_wrapper (zval_ptr=0x8215910)
    at zend_variables.c:192
#13 0x0811f895 in zend_hash_destroy (ht=0x81c8d48) at zend_hash.c:541
#14 0x08110b4a in shutdown_executor () at zend_execute_API.c:173
#15 0x0811a1aa in zend_deactivate () at zend.c:600
#16 0x0807acdc in php_request_shutdown (dummy=0x0) at main.c:735
#17 0x08125c5a in apache_php_module_main (r=0x820859c, display_source_mode=0)
    at sapi_apache.c:96
#18 0x0807843c in send_php ()
#19 0x08078495 in send_parsed_php ()
#20 0x081471e3 in ap_invoke_handler ()
#21 0x0815b3c3 in process_request_internal ()
#22 0x0815b424 in ap_process_request ()
#23 0x0815288d in child_main ()
#24 0x08152a38 in make_child ()
#25 0x08152bac in startup_children ()
#26 0x08153224 in standalone_main ()
#27 0x08153a77 in main ()
#28 0x4012f627 in __libc_start_main (main=0x81536e0 <main>, argc=2,
    ubp_av=0xbffffb94, init=0x8060014 <_init>, fini=0x8169c00 <_fini>,
    rtld_fini=0x4000dcc4 <_dl_fini>, stack_end=0xbffffb8c)
    at ../sysdeps/generic/libc-start.c:129

PHP configured with:
./configure --without-mysql --with-apache=../apache_1.3.22/ --enable-track-vars --with-interbase=/opt/interbase --enable-debug

Apache configured with:
./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a

Firebase version: FirebirdSS-
OS: RedHat 7.2 (Intel) 
Kernel: 2.4.17 (from no patches)
Libc: 2.2.4
GCC: 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
PHP: 4.1.2
 [2002-03-24 12:47 UTC]
The ibase_connect() create a connection that will be close automatically at the end of your script.

If you want to end it "manually" you have to 'free' the query too.

Try this :




 [2002-03-25 03:41 UTC]
change status in analyzed
 [2002-04-02 16:32 UTC] dbadmin at avenet dot stw dot uni-erlangen dot de
BUG 14558 seems to be the like this one. the solution to first call ibase_free_result before ibase_close solves  bug 14558!
But it would be good to mention this fact in the php-interbase-docu that you must not call ibase_close without ibase_free_result
 [2002-04-04 03:09 UTC]
Fixed in today CVS (4.3.0-dev).
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 05:01:31 2024 UTC