|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-04-25 11:35 UTC] uni_advisor at mail dot ru
Description:
------------
I am build Firebird-2.1.3.18185-0, install to /usr/local/firebird. Create link /usr/interbase.
<?php
$host = 'localhost:employee';
$username = 'SYSDBA';
$password = 'masterkey';
$dbh = ibase_connect($host, $username, $password) or die("a1");
$stmt = 'SELECT first 3 * FROM customer';
$sth = ibase_query($dbh, $stmt) or die("a2");
while ($row = ibase_fetch_row($sth)) {
echo $row[0], "\n";
}
ibase_free_result($sth);
ibase_close($dbh);
?>
Output:
1001
1002
1003
IBase functions works, but Segmentation fault at the end.
gdb php core
bt
#0 0x0000000801649590 in ?? ()
#1 0x000000080120e594 in __cxa_finalize () from /lib/libc.so.7
#2 0x00000008011beac7 in exit () from /lib/libc.so.7
#3 0x0000000000607cdc in main (argc=3, argv=0x7fffffffeb10)
at /usr/ports/lang/php5/work/php-5.2.12/sapi/cli/php_cli.c:1373
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 13:00:02 2025 UTC |
Try compile latest snapshot php5.3-201004261830 cd php5.3-201004261830 ./configure --prefix=/usr/local/php-test --disable-all --enable-debug make make install cd ext/interbase ./configure --with-phpconfig=/usr/local/php-test/bin/php-config --with-interbase=/usr/local/firebird make make install Fiebird info: Firebird/InterBase Support => dynamic Compile-time Client Library Version => Firebird API version 21 Run-time Client Library Version => FB-V6.3.3.18185 Firebird 2.1 gdb /usr/local/php-test/bin/php set args -q test1.php (gdb) run Starting program: /usr/local/php-test/bin/php -q test1.php 1001---- 1002---- 1003---- Program received signal SIGSEGV, Segmentation fault. 0x000000080114c590 in ?? () (gdb) where #0 0x000000080114c590 in ?? () #1 0x0000000800cc6594 in __cxa_finalize () from /lib/libc.so.7 #2 0x0000000800c76ac7 in exit () from /lib/libc.so.7 #3 0x00000000006c64f6 in main (argc=3, argv=0x7fffffffeb08) at /usr/home/serg/src/php5.3-201004261830/sapi/cli/php_cli.c:1394 All manipulation before and after portsnap port update.#3 0x0000000000607cdc in main (argc=3, argv=0x7fffffffeb10) at /usr/ports/lang/php5/work/php-5.2.12/sapi/cli/php_cli.c:1373 This position doesn't make much sense. I don't have interbase at hand to test but maybe valgrind helps. Could you please install valgrind and run USE_ZEND_ALLOC=0 valgrind /path/to/bin/php /path/to/script.php And paste the result?Firebird-2.1.3.18185-0 on FreeBSD 8.2 AMD64 Test code <?php $ib = ibase_connect('localhost:/db/test.fdb', 'USER', 'PASSWORD', 'WIN1251', 0, 3 ); print_r($ib); ?> running: # php test.php Resource id #4 Segmentation fault (core dumped) GDB backtrace from php.core #0 0x0000000801f6a5b0 in ?? () #1 0x00000008013c2e74 in __cxa_finalize () from /lib/libc.so.7 #2 0x000000080136d097 in exit () from /lib/libc.so.7 #3 0x00000000006fc506 in main (argc=2, argv=0x7fffffffead8) at /usr/ports/lang/php5/work/php-5.3.6/sapi/cli/php_cli.c:1395