[freetds] Sybase 12.0 inconsistencies

James K. Lowden jklowden at freetds.org
Fri Oct 12 13:18:54 EDT 2007


Marien, Mike wrote:
> On our development database, PHP with FreeTDS is able to query TEXT
> fields fine, the results come back without an problems.  On our
> production database, the same query to a TEXT field causes a
> segmentation fault.

http://www.freetds.org/userguide/pagenodata.htm

You want to isolate the cause.  The above page tells how to reproduce the
problem without using the webserver. If you've compiled FreeTDS and PHP
with debugging symbols included, a backtrace from the coredump will show
where the segmentation fault occurred and how you got there.  

Things that matter:

1.  Versions of PHP and FreeTDS.
2.  Extension used for database access, and its version
3.  TDS protocol version.
4.  Even without a backtrace, a TDSDUMP log will probably help.  
5.  If you're using ODBC, you can also get an ODBC trace.  

First question is where the segfault is happening.  Second question is
why, which usually translates to what happened just before.  Normally it's
a matter of dereferencing a null pointer, or
misunderstanding/misrepresenting the length of a string.  

ISTR issues with PHP and TEXT datatypes before.  You might want to search
the archives, too.  

HTH.  

--jkl



More information about the FreeTDS mailing list