ID: 32216
User updated by: paolo at ahead dot it
Reported By: paolo at ahead dot it
-Status: Feedback
+Status: Open
Bug Type: ODBC related
Operating System: linux i386
PHP Version: 5.0.3
New Comment:
[EMAIL PROTECTED] site]# gdb /dati/inetpub/php/bin/php
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run -f test.php
Starting program: /dati/inetpub/php/bin/php -f test.php
Error while mapping shared library sections:
: Success.
Error while reading shared library symbols:
: No such file or directory.
[Thread debugging using libthread_db enabled]
[New Thread -150633024 (LWP 6217)]
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -150633024 (LWP 6217)]
0x00223e51 in my_SQLPrepare () from /usr/lib/libmyodbc3.so
(gdb) bt
#0 0x00223e51 in my_SQLPrepare () from /usr/lib/libmyodbc3.so
#1 0x00220be3 in SQLExecDirect () from /usr/lib/libmyodbc3.so
#2 0x001d45f1 in SQLExecDirect_Internal (hstmt=0x93a1420,
szSqlStr=0x939d5cc, cbSqlStr=-3, waMode=0 '\0') at execute.c:374
#3 0x001d47e4 in SQLExecDirect (hstmt=0x93a1420, szSqlStr=0x939d5cc
"select 1", cbSqlStr=-3) at execute.c:443
#4 0x080c3ef9 in zif_odbc_exec (ht=2, return_value=0x93a215c,
this_ptr=0x0, return_value_used=1)
at /dati/inetpub/src/php-5.0.3/ext/odbc/php_odbc.c:1309
#5 0x081bf75e in zend_do_fcall_common_helper (execute_data=0xfefd2120,
opline=0x93a1c88, op_array=0x939d87c)
at /dati/inetpub/src/php-5.0.3/Zend/zend_execute.c:2711
#6 0x081bcd62 in execute (op_array=0x939d87c) at
/dati/inetpub/src/php-5.0.3/Zend/zend_execute.c:1400
#7 0x081a317b in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /dati/inetpub/src/php-5.0.3/Zend/zend.c:1069
#8 0x081754b4 in php_execute_script (primary_file=0xfefd44b0) at
/dati/inetpub/src/php-5.0.3/main/main.c:1628
#9 0x081c625a in main (argc=3, argv=0xfefd4574) at
/dati/inetpub/src/php-5.0.3/sapi/cgi/cgi_main.c:1568
(gdb)
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 20:09:22] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2005-03-07 11:49:40] paolo at ahead dot it
Description:
------------
on my linux box fedora core2 with kernel 2.6.5-1.358 i have a
segmentation fault on code reported if i compile php with mysql
support. if i remove mysql support with --without-mysql all work
correctly. on windows 2003 work with both mysql & iodbc support.
this is my configuration: ./configure --with-mysql=/dati/inetpub/mysql
--prefix=/dati/inetpub/php --with-gd --enable-gd-native-ttf
--enable-sockets --enable-pcntl --without-pear --with-zlib
--with-jpeg-dir=/dati/inetpub/src/jpeg-6b --with-curl --with-ttf
--with-freetype-dir --with-imap=/dati/inetpub/src/imap-2004a
--with-iodbc=/dati/inetpub/iodbc --with-kerberos
Reproduce code:
---------------
<?
putenv("ODBCINI=/etc/odbc.ini");
$db = odbc_connect("myodbc3","root","");
$rec = odbc_exec($db,"select 1");
while(odbc_fetch_row($rec))
echo odbc_result($rec, "1") ."\n";
?>
Expected result:
----------------
1
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32216&edit=1