Re: Socket connection issue
- From: "mijn naam" <whatever@xxxxxxxxxxxxxxx>
- Date: Sun, 5 Apr 2009 03:11:46 +0200
"Martin" <ironwoodcanyon@xxxxxxxxx> schreef in bericht news:2cpft49328lotm6es6naudcq91jaoslbch@xxxxxxxxxx
On Sat, 4 Apr 2009 17:38:54 +0200, "mijn naam"
<whatever@xxxxxxxxxxxxxxx> wrote:
"Martin" <ironwoodcanyon@xxxxxxxxx> schreef in bericht
news:ovret4tssppt9n84gi6fkh08ukhfdhpbob@xxxxxxxxxx
On BOTH computers, netstat shows MyProcess.exe is listening on
0.0.0.0:1001
FWIW, both computers show that a process named alg.exe is listening on
127.0.0.1:1028
Any thoughts?
Not really, just this one: I doubt that your problem is related to php. Try
to find another program to make a connection (e.g. telnet) and try
connecting to 127.0.0.1 port 1001. If you cannot, php is not part of the
problem.
I tried what you suggested - it all works just fine.
I ran MyProcess.exe, popped open a DOS window and ran telnet. Told it
to connect to "localhost 1001" and it did (I'm displaying the
connection status in MyProcess also). I then typed in one of the
commands that a PHP script sends and MyProcess responded correctly.
When I closed the telnet connection, the display in MyProcess went
back to "Listening". IOW, there is no doubt that this worked.
I then repeated the test using "127.0.0.1 1001" and again everything
worked properly.
I did all of the above on both computers - the one where the PHP
scripts execute ok and the one where they do not. The results were the
same in both cases.
Now, I'm not saying that this is a PHP problem. I'm just saying that I
don't know what the hell the problems is!
Any additional suggestions will be greatly appreciated. Thanks.
I'm almost out of ideas.
I'd continue hunting down this bug by trying various settings for $address:
// doesn't work: $address=$_SERVER['SERVER_NAME']
$address="localhost"
$address="localhost."
$address="127.0.0.1"
If "localhost" works, double check the contents of $_SERVER['SERVER_NAME']
If it doesn't but if "localhost." and/or "127.0.0.1" work, there's something wrong with resolving names.
I would also try to connect to another service, one you know is running on the box (http perhaps?). Does that work using $address=$_SERVER['SERVER_NAME'] ? If so, the difference may be your other application after all.
It boils down to: try to isolate the problem.
By the way: get rid of that monkey tail in front of fsockopen during testing this.
.
- Follow-Ups:
- Re: Socket connection issue
- From: Martin
- Re: Socket connection issue
- References:
- Socket connection issue
- From: Martin
- Re: Socket connection issue
- From: mijn naam
- Re: Socket connection issue
- From: Martin
- Re: Socket connection issue
- From: mijn naam
- Re: Socket connection issue
- From: Martin
- Socket connection issue
- Prev by Date: Re: Please help me to find ip address to location using php code
- Next by Date: Re: Please help me to find ip address to location using php code
- Previous by thread: Re: Socket connection issue
- Next by thread: Re: Socket connection issue
- Index(es):
Relevant Pages
|