Thursday, March 31, 2011

PHP mssql_connect works in Command Line but not Apache

Just wanted to share an issue I was experiencing trying to connect to a remote MSSQL Server with mssql_connect(), from a ubuntu box. With identical php.ini files and correct permissions the connect would be established when I ran the connection script through the command line, but not in the browser.

From stackoverflow
  • After much forum digging I came cross this: Add putenv("TDSVER=70"); to your script or whatever the VERSION is for your ntwdblib.dll. The tds library and the MS ntwdblib were speaking two different protocols. Hope this helps.

0 comments:

Post a Comment