Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

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

Any contribution is appreciated

share|improve this question
Are both Named Pipes and TCP/IP enabled in the SQL Server Configuration Manager? – Scott Keck-Warren Feb 3 '11 at 13:38
up vote 1 down vote accepted

For SQL Server Express, remote connections are not allowed by default. Have you enabled them?


share|improve this answer

Check virtual network mode in Networking Options of your Parallels Desktop. It shouldn't be "Networking is not required" for sure.

Seems "Bridged Ethernet" mode it's only your option. Both your Mac and virtual Windows will have own separate IP addresses in this mode and you can communicate between virtual PCs.

share|improve this answer
"Please note that both PHP and MSSQL are running within the virtualised environment." I thought that was clear. lol – Zen Savona Feb 2 '11 at 12:44
For God's sake, Sheldon, do I have to hold up a "sarcasm" sign every time I open my mouth? ;) – Sergey Feb 2 '11 at 13:31
fffffffuuuuuuuuuuuuu – Zen Savona Feb 2 '11 at 13:55

Probably worth confirming MS SQL is listening on ports 1433 & 1434, or whatever it might have been overriden to in the registry.

netstat -a

look for something like:


They may identify it as mssql were you have port numbers above.

Management studio may be making a local connection, ie. not across a network interface.

If there's nothing listening in the netstat cmd above you may need to activate one of the virtual machines network options in order to make a local connection work. Bit of a guess there as i've never setup a vm without having one of the network options active.

Cheers M.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.