[freetds] basic install OK but can't get PHP to work

Lowden, James K james.k.lowden at alliancebernstein.com
Thu Jul 27 09:23:52 EDT 2006


> From: kenn
> Sent: Thursday, July 27, 2006 9:12 AM
> 
> I'm attempting to install freetds on my Debian 3.1 (sarge).  Using
> apt-get, I've installed freetds and configured freetds.conf with:
> 
> [psi]
>      host = 192.168.100.17
>      tds version = 7.0
> 
> I can connect using sqsh, so I think I'm okay so far.

Yes, that's right.  

> Then I installed php4-odbc but have not been successful connecting
...
> I get the following error:
> 
> we are trying to connect Warning: odbc_connect(): SQL error:
> [unixODBC][Driver Manager]Data source name not found, and no default
> driver specified, SQL state IM002 in SQLConnect in
/var/www/eve/index.php
> on line 6 couldn't connect

PHP is using FreeTDS's ODBC driver and the Driver Manager, unixODBC,
can't find the server.  It looks like your odbc.ini isn't correct.  If
so, isql won't work either.  

In case it matters, you might not need ODBC.  There is a PHP mssql
extension that works with FreeTDS and does not use ODBC.  (It uses
db-lib.)

HTH.

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, any review, dissemination,
distribution or duplication of this communication is strictly prohibited. If you are
not the intended recipient, please contact the sender immediately by reply e-mail
and destroy all copies of the original message. Please note that we do not accept
account orders and/or instructions by e-mail, and therefore will not be responsible
for carrying out such orders and/or instructions.  If you, as the intended recipient
of this message, the purpose of which is to inform and update our clients, prospects
and consultants of developments relating to our services and products, would not
like to receive further e-mail correspondence from the sender, please "reply" to the
sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.



More information about the FreeTDS mailing list