Connecting to Mssql DB with PHP

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
thewal
Forum Newbie
Posts: 2
Joined: Mon Mar 23, 2009 4:42 am

Connecting to Mssql DB with PHP

Post by thewal »

Hi,

I am trying to connect to mssql 2005 with SQL. I have searched the net but I am still unable to connect.

Do I need IIS running on the PC to connect?

I have used the code from the php manual but I still can't get connection. I do not get any errors showing up on the web browser either.

My DB is running on the local machine.

Thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Connecting to Mssql DB with PHP

Post by Christopher »

Do you have the mssql driver loaded into PHP?
(#10850)
thewal
Forum Newbie
Posts: 2
Joined: Mon Mar 23, 2009 4:42 am

Re: Connecting to Mssql DB with PHP

Post by thewal »

At the end of the php ini file I have the following

[PHP_MSQL]
extension=php_msql.dll
[PHP_MSSQL]
extension=php_mssql.dll
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_ODBC]
extension=php_pdo_odbc.dll

extension=php_sqlsrv_ts.dll
Post Reply