Jump to content

mssql using freetds works in command line but not apache


Recommended Posts

Hi Guys,

 

I've moved to a dedicated webserver and my mssql_connect commands no longer work.

 

After installing freetds and getting it working via command line using 'tsql' I still can't connect via my php pages.

 

My old server has this in the config commands '--with-pdo-dblib=shared,/usr' but my new server has no ref to pdo-dblib so could that be it?

 

Everything else seems to be set up the same but I get  "Unable to connect to server" if I use mssql_connect or "SQLSTATE[01002] Adaptive Server connection failed (severity 9)" if I use new PDO('dblib:host=..." etc

 

I have root access but don't know how to add the config commands to php as I'm a linux n00b.

 

Any ideas?

 

Thanks,

 

Leigh

 

WHM 11.32.2 (build 18)

CENTOS 5.8 i686 standard

 

 

Edit: it may be worth noting that on the command line I had to add TDSVER=7.0 before the command to force it to use version 7, or I got Error 20017 & 20002, not sure how to change that for apache

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.