php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32216 mysql & iodbc support
Submitted: 2005-03-07 11:49 UTC Modified: 2005-06-14 09:54 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: paolo at ahead dot it Assigned:
Status: Closed Package: ODBC related
PHP Version: 5CVS-2005-03-15 OS: linux i386
Private report: No CVE-ID: None
 [2005-03-07 11:49 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-09 01:11 UTC] sniper@php.net
This looks lot like yet another library war. :)
(symbols clashing with each other..)

This _might_ be fixed in CVS, so do try this snapshot:

  http://snaps.php.net/php5-latest.tar.gz


 [2005-03-15 09:59 UTC] paolo at ahead dot it
I test new CVS now and I have againg Segmentation Fault.

PHP 5.1.0-dev (cgi) (built: Mar 15 2005 09:52:28)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.1.0-dev, Copyright (c) 1998-2004 Zend Technologies

This is the backtrace:
[root@server php5-200503150730]# gdb /dati/inetpub/php-test/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 /dati/inetpub/waroot/site/new.vialescarpe.com/test.php 
Starting program: /dati/inetpub/php-test/bin/php -f /dati/inetpub/waroot/site/new.vialescarpe.com/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 -150355840 (LWP 17670)]
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 -150355840 (LWP 17670)]
0x00273e51 in my_SQLPrepare () from /usr/lib/libmyodbc3.so
(gdb) bt
#0  0x00273e51 in my_SQLPrepare () from /usr/lib/libmyodbc3.so
#1  0x00270be3 in SQLExecDirect () from /usr/lib/libmyodbc3.so
#2  0x001335f1 in SQLExecDirect_Internal (hstmt=0x97d8e48, szSqlStr=0x97d337c, cbSqlStr=-3, waMode=0 '\0') at execute.c:374
#3  0x001337e4 in SQLExecDirect (hstmt=0x97d8e48, szSqlStr=0x97d337c "select 1", cbSqlStr=-3) at execute.c:443
#4  0x0808df4f in zif_odbc_exec (ht=2, return_value=0x97d7eb4, this_ptr=0x0, return_value_used=1)
    at /dati/inetpub/src/php5-200503150730/ext/odbc/php_odbc.c:1309
#5  0x0818e94f in zend_do_fcall_common_helper_SPEC (execute_data=0xfeecc950) at zend_vm_execute.h:175
#6  0x08190a5a in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xfeecc950) at zend_vm_execute.h:1535
#7  0x0818e2f1 in execute (op_array=0x97d36d4) at zend_vm_execute.h:78
#8  0x0817361f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /dati/inetpub/src/php5-200503150730/Zend/zend.c:1058
#9  0x0814459c in php_execute_script (primary_file=0xfeececf0) at /dati/inetpub/src/php5-200503150730/main/main.c:1637
#10 0x081d2524 in main (argc=3, argv=0xfeecedb4) at /dati/inetpub/src/php5-200503150730/sapi/cgi/cgi_main.c:1580
(gdb)
 [2005-03-24 16:42 UTC] paolo at ahead dot it
I try version 5CVS-2005-03-15 and the I always have Segmentation Fault!

Can anyone help me please.
 [2005-06-13 11:14 UTC] sniper@php.net
Please report this to MySQL Ab.

 [2005-06-14 09:54 UTC] paolo at ahead dot it
I try recompile php without directory indication in --with-mysql and all work fine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 22:01:33 2024 UTC