FreeTDS on Leopard 10.5
* Installed Entropy PHP 5.2.9.
* Installed freetds 0.82 via ports.
* Set the following environment variables:
Note: We have a specific port for our queries, you will need to use the appropriate port (ie. 1433 for MSSQL default queries)
Created a couple symbolic links to the active freetds.conf file.
ln -s /usr/local/php5/etc/freetds.conf /etc/freetds.conf
ln -s /usr/local/php5/etc/freetds.conf /usr/local/etc/freetds.conf
ln -s /usr/local/php5/etc/freetds.conf /opt/local/freetds/etc/freetds.conf
REBOOT the server!!!
If that doesn’t fix it then it was the only other thing I did which was to force Apache to run in i386 mode:
There is currently an issue resulting from the fact that Apache on Mac OS X 10.5 is built as a 64 bit application. On Macs that support 64 bits (all current Mac models), Apache will run in 64 bit mode. This is incompatible with most ODBC drivers, including those currently available from Actual Technologies.
Until we can make 64 bit versions of our drivers available, we recommend a workaround to force Apache to run in 32 bit mode. Using the Terminal prompt, enter the following commands:
sudo mv /usr/sbin/httpd /usr/sbin/httpd.64
sudo lipo -thin i386 /usr/sbin/httpd.64 -output /usr/sbin/httpd.i386
sudo ln -s /usr/sbin/httpd.i386 /usr/sbin/httpd
Now restart Web Sharing in the System Preferences, and continue with the instructions for “Invoking ODBC Functions from ODBC” below.
NOTE: if you ever need to restore Apache to 64 bit mode, just enter the following command:
sudo mv /usr/sbin/httpd.ub /usr/sbin/httpd