lellis2k Posted April 19, 2012 Share Posted April 19, 2012 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 Link to comment https://forums.phpfreaks.com/topic/261239-mssql-using-freetds-works-in-command-line-but-not-apache/ Share on other sites More sharing options...
lellis2k Posted April 19, 2012 Author Share Posted April 19, 2012 Well I solved it, had to change the 5.0 to 7.0 in the configuration file in the tar.gz before I reinstalled it Link to comment https://forums.phpfreaks.com/topic/261239-mssql-using-freetds-works-in-command-line-but-not-apache/#findComment-1338729 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.