|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22056 when using Command-Line-Interpreter getting sgementation fault on Exit
Submitted: 2003-02-04 15:09 UTC Modified: 2003-08-16 10:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php at business-solutions dot at Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.3.0 OS: Linux (Kernel 2.4.20)
Private report: No CVE-ID: None
 [2003-02-04 15:09 UTC] php at business-solutions dot at
When executing a script from command line (php -f script.php) i get a segmentation fault after successfully finishing the script.
This only happens, when using the ibase functions. Replacing them with mysql everything works fine.
executing the script by calling it from a browser it works too.
This only happens, when using command-line-interface and ibase-functions.

tried the following with same result:
- using ibase_prepare, ibase_execute instead of ibase_query
- explicit start and commit of transactions
- ibase_pconnect instead of ibase_connect

Here's the script i use:

 exec("wget -q http://gateway/accounting/ip.cgi");
 If ($link=ibase_connect("bogus.gdb","xx","xx","WIN1250")) {
  while (!feof($hnd)) {
   If ($buf=fgets($hnd)) {
    if ($buf<>"") {
     list($src,$dst,$bytes,$pack,$rest)=split(" ",$buf,5);
     $sql="INSERT INTO AcctInfo(SRC,DST,Bytes,Packets) VALUES ('$src','$dst',$bytes,$pack)";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-04 17:05 UTC] php at business-solutions dot at
installed supplied snapshot - 4.3.1-dev

Unfortunatly i get the same results!
 [2003-02-05 10:44 UTC]
Please compile your PHP with --enable-debug flag and generate the backtrace of the crash. Once you have the backtrace please post it here.
 [2003-02-05 11:20 UTC] php at business-solutions dot at
Here's the backtrace requested:

#0  0x40742df0 in ?? ()
#1  0x0816c8ec in main (argc=2, argv=0xbffffb74) at /usr/src/php4-STABLE-200302042030/sapi/cli/php_cli.c:820
#2  0x420158d4 in __libc_start_main () from /lib/i686/
 [2003-05-01 20:29 UTC]
Please try using this CVS snapshot:
For Windows:

And if this crash still happens, provide an updated GDB backtrace. (don't forget --enable-debug!)

 [2003-05-09 07:26 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2003-08-16 10:00 UTC]
This bug is most likely caused by the same problem as bug #7014: some API call in the shutdown process returns an error, while the error buffer has already been released.
This has been fixed in 4.3.3
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 22:01:31 2024 UTC