Anonymous

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

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

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <p> <br> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA