views:

20

answers:

1

I have a client who wants me to build a site using PHP and SQL Server. Problem is I do all my PHP development in OS X running Apache. I have one machine running Windows with an SQL Server production environment but I can't seem to connect via "sqlsrv_connect" because I can't install the drivers for sql server on my Mac

Has anyone found any good work flows for this kind of situation?

 -------------------   --------------------
|       osx         | |      windows       |
|                   | |                    |
|                   | |                    |
|     php           | |      sql svr       |
|     apache        | |                    |
|                   | |                    |
|                   | |                    |
 -------------------   --------------------
    ^                                  ^
    |______ select * from database ____|
A: 

It's not completely clear from your question if OS X and Apache are a client requirement or your own personal development preference?

As far as I know, your options are:

  1. Install FreeTDS
  2. Develop on Windows (Apache or IIS) and use the official MS PHP drivers
  3. Use the official MS JDBC driver from PHP (no idea if that's even possible)

Option 1 should work fine (although FreeTDS has limited functionality compared to official drivers) but option 2 is certainly the path of least resistance. And I would confirm the client's requirements/expectations for deployment before making a decision.

If you do decide (or need) to develop on Windows there's plenty of information available:

http://www.microsoft.com/sqlserver/2005/en/us/php-driver.aspx

http://sqlsrvphp.codeplex.com/

Pondlife