0

I was wondering how to connect to SQL server 2012 that is on a physical server running Windows server 2012 using PHP.

I have WAMP installed on my pc and we are all connected to a domain. The easy way would probably be to install WAMP/XAMPP on the server but that is not an option. Am I over thinking this or maybe a little bit on the slow side ?

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
Brabazoo
  • 21
  • 4
  • Possible duplicate of [How to use PHP to connect to sql server](http://stackoverflow.com/questions/18632607/how-to-use-php-to-connect-to-sql-server) – Patrick Hofman Mar 22 '17 at 10:54

1 Answers1

1

Use the mssql extension for PHP to import the MS SQL Server functions ( http://php.net/manual/en/ref.mssql.php ) and use them in a similar fashion to how you'd use MySQL.

If you're running SQL Server Express and it's running on a remote computer then you'll need to enable TCP/IP networking as this is disabled by default. Look for the SQL Server Configuration Manager in your Start Menu programs list.

Dai
  • 141,631
  • 28
  • 261
  • 374