I'm having a bit of trouble getting the socket example 1 from php.net (http://www.php.net/sockets) to listen on my server. Perhaps someone can suggest what I'm doing wrong. The only modifcation that I did to the script was to change the ip address.
Here are my stats:
php version 4.3.7
Apache/2.0.46 (Red Hat) Linux
I'm unable to run the program from the command line by simply typing ./script_name.php. I don't know why, perhaps that is my problem. I'm able to get the line below to at least return the command line to me after I hit enter:
[admin@www test]$ php -c /etc/php.ini -f socketTest.php
But when I do a netstat -a, the script is not listed and when I attempt to telenet, the following error is returned:
I removed my ip address and replaced it with some.ip.address
####
[admin@www test]$ telnet some.ip.address 10000
Trying some.ip.address...
telnet: Unable to connect to remote host: Connection refused
####
Perhaps someone can suggest what I'm doing wrong. Your feedback will be greatly appreciated.
Thanks,
Andrew Pasetti