On Fri, 18 Apr 2008 10:09:17 -0700, Martin <ironwoodcanyon@gmail.com>
wrote in <19lh04lcv9gfhdltk51qt33oj14r0alrek@4ax.com>:
>I have the following code being used in several of my PHP scripts
>(it's in an include file). It opens a socket connection to a process
>that's running on the same computer that IIS/PHP is running on. The OS
>is Windows XPPro. This all works fine - no problems.
>
>$portnum = 1001;
>$address = $_SERVER['SERVER_NAME'];
>$socket = @fsockopen($address, $portnum, $errno, $errstr, 2);
>
>
>For experimental purposes, I copied the scripts over to another
>computer that's set up with IIS/PHP in Windows Vista Business. The
>socket fails to connect. After much experimentation, I discovered that
>if I used the server's IP address instead of the
>$_SERVER['SERVER_NAME'] variable, then the socket connects just fine.
Open a command window on the Vista box and try to ping by both IP and
hostname. If pinging by hostname fails, then you have a DNS issue,
not a php issue. In that case, I'd suggest heading over to
microsoft.public.* and asking in a Vista group.
If pining by hostname works, perhaps it is the port that is blocked?
Check the settings in the Vista box's firewall.
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.celticwolf.com/ | Technical Writing
(703) 580-0210 | Research