0

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

1
  • Are both Named Pipes and TCP/IP enabled in the SQL Server Configuration Manager? Commented Feb 3, 2011 at 13:38

3 Answers 3

1

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

See https://stackoverflow.com/questions/11278114/enable-remote-connections-for-sql-server-express-2012

0

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.

3
  • "Please note that both PHP and MSSQL are running within the virtualised environment." I thought that was clear. lol Commented Feb 2, 2011 at 12:44
  • For God's sake, Sheldon, do I have to hold up a "sarcasm" sign every time I open my mouth? ;) Commented Feb 2, 2011 at 13:31
  • fffffffuuuuuuuuuuuuu Commented Feb 2, 2011 at 13:55
0

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:

TCP HOSTNAME:1433 HOSTNAME.FQDN:0 LISTENING TCP HOSTNAME:1434 HOSTNAME.FQDN:0 LISTENING 

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.