Topic: FreeTDS compiled with enable-msdblib ?
Problem: After upgrade date strings are now returned incorrectly from php-mssql / freetds driver
Is the REMI release of FreeTDS compiled with enable-msdblib option?
Environment
-----------
CentOS release 5.5 (Final) ( 2.6.18-194.32.1.el5.centos.plus )
PHP 5.3.10 (cli) (built: Feb 4 2012 07:16:03)
5.5.20 MySQL Community Server (GPL) by Remi
freetds 0.82 using 8.0 in the driver
Example
-------
Date should be: 2012-02-19 05:58:00
After php upgrade: 2012-19-50 00:00:13
If in php.ini I set mmsql.datetimeconvert = On, date is correct, just wrong format.
Feb 19 2012 05:58:00:000PM
This looked to be a driver issue in freetds interpreting the default MS SQL date string.
ATTEMPT
-------
I've tried workarounds such as http://www.propelorm.org/cookbook/using … erver.html
/etc/locales.conf
date format = %b %e %Y %I:%M:%S:%z%p
ATTEMPT
-------
Force on every connection string the date format. Only works on input dates, not output.
ATTEMPT: Build from REMI Repository
------------------------------------
We read that freetds should be compiled with
--enable-msdblib
Enable Microsoft behavior in the DB-Library API where it diverges from Sybase's. Use this option if you are replacing Microsoft's libraries with FreeTDS. This option specifies default behavior. Programs can change the default at compile time by defining MSDBLIB or SYBDBLIB (for Microsoft or Sybase behavior, respectively).
Problem:
I could not download the source to freeTDS 0.82 from rpms.famillecollet.com/SRPMS/ as it is only 0.64.
What is the configuration line used when you build freetds? Does it enable-msdblib?