Zen
Zen

Reputation: 7385

Connecting to SQL Server on Parallels Desktop with PHP

well I recently bought a Mac and am using it as my primary computer.

Because I am required to work with MSSQL via PHP, I have installed Parallels Desktop and run Server 2008 R2 on it. I am using the same mixed mode authentication which I previously had on windows.

When I attempt to connect to the server with PHP using either a new test file or my old code, it just doesn't find the server.

I have tried running PHP on the XP install with parallels, and using the hostname as COMPUTERNAME\SQLEXPRESS, LOCALIP\SQLEXPRESS localhost localip etc, PHP never finds the server.

Please note that both PHP and MSSQL are running within the virtualised environment.

Also note that I can connect to the database server using Management Studio without problems, so SQL Server is running.

Any contribution is appreciated

Upvotes: 0

Views: 811

Answers (1)

Pondlife
Pondlife

Reputation: 16240

I have no idea how your host OS communicates with the virtual Parallels environment, but by default the network protocols for remote access to SQL Express are disabled:

http://msdn.microsoft.com/en-us/library/ms165677.aspx

So if your PHP application is trying to use TCP/IP to connect to SQL Express, then you need to enable the protocol first.

If this doesn't help, you might get a better answer on serverfault.com, because your issue has more to do with system configuration than with development.

Upvotes: 1

Related Questions