[freetds] segmentation fault when null field encountered

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Jul 7 10:19:57 EDT 2006


> 
> Hi All,
> 
> I have FreeTDS working on two machines: and i386 and an x64 
> both running Fedora Core 4 32bit and 64bit versions 
> respectively.  The i386 machine works fine, however the x64 
> crashes when a null result is returned with $whatever = 
> odbc_result($result, 1);
> 
> Both PCs are set up the same, and I installed the FC4 FreeTDS 
> packages in the same way.  isql & tsql also work perfectly 
> with both and I have configured the FreeTDS configuration & 
> unixODBC configurations the same.  The necessary PHP modules 
> have also been installed and configured correctly.  
> 


Well, so you are using a PHP script with a stack like

PHP <=> php_odbc <=> ODBC <=> FreeTDS <=> sql server

I suspect a bug in one of the first 4... probably from php_odbc to
FreeTDS.

I would
- simplify script at minimun
- be able to execute script from command line
- enale core (ulimit -c unlimited)
- launch script (php script.php)
- load core with gdb (gdb $(which php) core.xxx)
- dump stack (bt)

> Does this seem like a problem relating the 64bit FC4 package 
> or something else?
> 
> Any help would be greatly appreciated- I have spent three 
> days trying to get this to work!

Currently I don't have a x64 environment to play with :)

freddy77




More information about the FreeTDS mailing list