[unixODBC-support] can't get logging working

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


Hi,

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=192.168.23.35; Port=1433;
Database=ExportInformationSystem; UID=user; PWD=password');

I'm running this on Ubuntu 12.04

/etc/odbc.ini is

[server]
Driver = FreeTDS
Description = Connection to SQL Server
TraceFile=/tmp/sql.log
Trace=Yes
ForceTrace=Yes
Server = 192.168.23.35
Database=ExportInformationSystem
Port = 1433
tds_Version = 8.0

/etc/freetds/freetds.ini

# Global settings are overridden by those in a database
# server specific section
[global]
        # 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,

Jochen


More information about the unixODBC-support mailing list