I have some php scripts that connect to a remote service to execute a few commands using TCP. Scripts work fine on my web host but on my own Apache and PHP server that I set up for testing I cannot get them to work. I have tried two different computers now and the problem is the same on both.
I installed the latest Apache 2.2 server, followed by latest PHP 5.2.8 build.
Scripts get some user input then they connect to this remote service using the socket_connect and connection succeeds and I immediately receive some data from the remote service so I know the connection works.
Problem comes when I send some data to the remote service. I use the socket_send and the function succeeds and no error is reported. In fact the function returns the number of bytes sent which is correct so it looks like the data is being sent, only on the remote service side I cannot see anything coming through.
Script running on my web host connects to the SAME remote service and successfully sends the data and the remote service receives it!
This is driving me insane. First I thought something was wrong with my computer, so I set up a fresh new computer (new OS and all) and the same problem. I am stumped.
Since PHP reports no errors and Apache reports no errors in logs either I simply cannot explain where the data is being lost. I have verified I can send the data to this remote service from these computers by simply using telnet and the remote service receives it ok, because I though there is some firewall somewhere blocking something but this has me confused to death. I even tried using IIS (yuk) and the same problem exists which leads me to believe the problem itself is in PHP and nothing else.
Has anyone here ever experienced this problem? Any info/tips would be appreciated.
Regards,
TiCaL