Re: PHP and Threads
| From: | Dan Hardiker | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: PHP and Threads | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-83139@lists.php.net to get a copy of this message | ||
Hi Daniel,
I noticed that your phpserv code, when ran on FreeBSD 4.5-STABLE, had odd
effects. The most prominant being that no matter what port I told it to
bind to, it would always pick a random avaiable port.
I traced this to a bug in your code:
function generic_server($port, $address=0) {
The socket_bind function doesnt like not being passed a dotted address, so
I altered the code to be:
function generic_server($port, $address="0.0.0.0") {
and voila it was binding to the correct port.
- Dan Hardiker