bmsullivan
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by bmsullivan
-
-
In theory, socat doesn't know it's being run under php so its behaviour shouldn't change. But it MAY know that it's not connected to a terminal, and many programs change behaviour based on that.
Thanks, I'll look into the terminal thing you mentioned, that's at least a starting point as to where I can look. If I discover anything else I'll post later on.
-
I've successfully been able to use:
both
shell_exec('socat -V')
and
system('socat -V')
My first question is:
Which one is better to use? I've been reading the man pages on each, but can't tell if either is better.
Also, why is it that these commands will work, but if I want to use socat with an address and port to connect to it won't generate any output? system('socat - TCP4:my.address:portnumber').
I'm working in Ubuntu and have the socat connection working fine in a shell, I'm just missing the php connection.
The server is working during the call, I've tried to flush() the php buffer and print out variables, but can't get anything.
Wondering if I might need to connect to a socket via php and maybe that is why it won't work via the shell command? If so, why?
Anyone have any insights on this?
Using socat within php
in PHP Coding Help
Posted
After some searching I'm finding that the best way is to just connect directly with the socket via php...that will be my next move!