[unixODBC-support] can't get logging working

Jochen Daum jd at automatem.co.nz
Fri Sep 21 04:01:22 BST 2012


I'm using PHP - PDO - unixODBC - FreeTDS to access MS SQL Server 2008
from PHP. I have an issue with large text columns not being returned
and come to a dead end investigating common reasons. Because of this I
want to use UnixODBC logging to further research the issue.

My PHP connection line is

new PDO('odbc:Driver=FreeTDS; Server=; Port=1433;
Database=ExportInformationSystem; UID=user; PWD=password');

I'm running this on Ubuntu 12.04

/etc/odbc.ini is

Driver = FreeTDS
Description = Connection to SQL Server
Server =
Port = 1433
tds_Version = 8.0


# Global settings are overridden by those in a database
# server specific section
        # TDS protocol version

        # Whether to write a TDSDUMP file for diagnostic purposes
        # (setting this to /tmp is insecure on a multi-user system)
        dump file = /tmp/freetds.log
        dump file append
        debug flags = 0xffff

        # Command and connection timeouts
;       timeout = 10
;       connect timeout = 10

        # If you get out-of-memory errors, it may mean that your client
        # is trying to allocate a huge buffer for a TEXT field.
        # Try setting 'text size' to a more reasonable limit
        client charset = UTF-8
        tds version = 8.0
        text size = 10971520
        port = 1433

However, /tmp/sql.log is never created, nor is freetds.log

Can anyone advise on what to try to get logging working? Does the lack
of log possibly indicate a segfault in apache?

Thanks for any help.

Kind Regards,


More information about the unixODBC-support mailing list