Anonymous - Thu, 07/11/2013 - 19:30

Permalink

I am using Ubuntu 13.04, so, odbcinst.ini was in /usr/share/tdsodbc/

And then I just did this:

$ sudo apt-get install freetds-bin freetds-common tdsodbc odbcinst php5-odbc unixodbc
$ sudo mv /etc/odbcinst.ini /etc/odbcinst.ini.bak
$ sudo find / -name odbcinst.ini
$ sudo cp /usr/share/tdsodbc/odbcinst.ini /etc/
$ sudo service apache2 restart

and I am getting the following errors

Unable to open database.
Error message:

exception 'PDOException' with message 'SQLSTATE[08001] SQLDriverConnect: 0 [unixODBC][FreeTDS][SQL Server]Unable to connect to data source' in /var/www/clients/client2/web6/web/sqltest1.php:4 Stack trace: #0 /var/www/clients/client2/web6/web/sqltest1.php(4): PDO->__construct('odbc:Driver=Fre...') #1 {main}.

Not sure what went bad but not sure what to do next
Thanks

CAPTCHA