Unable to mssql_connect unless in my office

Unable to mssql_connect unless in my office

am 02.07.2007 05:09:45 von Mike Beddo

I have a very strange problem. If anyone has an insight please let me
know.

When my laptop is docked in my office I have no problem using
mssql_connect to the SQL server running on localhost. When I take my
laptop home I get the following error:

Warning: mssql_connect() [function.mssql-connect]: Unable to
connect to server: localhost

But something like "osql -S localhost -U sa -P " works fine!

If I connect to my office from home using checkpoint secure client then
I can connect to localhost! If I'm not connected to my office then I
can't connect to localhost.

I am using XAMPP 1.6.2 on windows xp professional SP2.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Unable to mssql_connect unless in my office

am 02.07.2007 09:35:31 von php

It sure sounds like your host file points localhost to a server at your
work, rather than to 127.0.0.1... or you're running a server on your
laptop that needs stuff from your work LAN to function...


Mike Beddo skrev:
> I have a very strange problem. If anyone has an insight please let me
> know.
>
> When my laptop is docked in my office I have no problem using
> mssql_connect to the SQL server running on localhost. When I take my
> laptop home I get the following error:
>
> Warning: mssql_connect() [function.mssql-connect]: Unable to
> connect to server: localhost
>
> But something like "osql -S localhost -U sa -P " works fine!
>
> If I connect to my office from home using checkpoint secure client then
> I can connect to localhost! If I'm not connected to my office then I
> can't connect to localhost.
>
> I am using XAMPP 1.6.2 on windows xp professional SP2.
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php