#22056 [Opn->Fbk]: when using Command-Line-Interpreter getting sgementation fault on Exit
| From: | sniper@php.net | Date: | Fri, 02 May 2003 01:29:19 +0000 |
| Subject: | #22056 [Opn->Fbk]: when using Command-Line-Interpreter getting sgementation fault on Exit | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38922@lists.php.net to get a copy of this message | ||
ID: 22056
Updated by: sniper@php.net
Reported By: php at business-solutions dot at
-Status: Open
+Status: Feedback
Bug Type: InterBase related
Operating System: Linux (Kernel 2.4.20)
PHP Version: 4.3.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
And if this crash still happens, provide an updated GDB backtrace.
(don't forget --enable-debug!)
Previous Comments:
------------------------------------------------------------------------
[2003-02-05 11:20:20] 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/libc.so.6
------------------------------------------------------------------------
[2003-02-05 10:44:26] iliaa@php.net
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-04 17:05:23] php at business-solutions dot at
installed supplied snapshot - 4.3.1-dev
Unfortunatly i get the same results!
------------------------------------------------------------------------
[2003-02-04 15:36:02] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-02-04 15:09:06] 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:
<?php
exec("wget -q http://gateway/accounting/ip.cgi");
$hnd=fopen("ip.cgi","r");
If ($link=ibase_connect("bogus.gdb","xx","xx","WIN1250")) {
while (!feof($hnd)) {
If ($buf=fgets($hnd)) {
$src="";
$dst="";
$bytes="0";
$pack="0";
$buf=trim($buf);
if ($buf<>"") {
list($src,$dst,$bytes,$pack,$rest)=split(" ",$buf,5);
$sql="INSERT INTO AcctInfo(SRC,DST,Bytes,Packets) VALUES
('$src','$dst',$bytes,$pack)";
ibase_query($link,$sql);
}
}
}
ibase_close($link);
}
fclose($hnd);
unlink("ip.cgi");
php?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22056&edit=1