Debugging PHP and SQL Server
I am working on a script in PHP that needs to get some information from a SQL Server database. However, I am having problems connecting to the database. When I use the mssql_connect () function, it gives me an error and says that it cannot connect to the database. However, this does not provide any basis. Is there a way to find out why it won't connect? There seems to be no mssql_error () function or something like mysql library.
source to share
Try using pdo ( http://php.net/pdo ). mssql extension is a mess.
Instead of "it returns" for blank lines. This seems to be a bug in ntwdblib that has never been fixed. When I ran into the problem, I almost lost my mind ...
To connect a client: have you activated tcp / ip on sql server? In MSSQL 2005 Express, it is not activated by default!
source to share