2009/6/29 Stuart <stut...@gmail.com>
> 2009/6/29 Luke <l...@blog-thing.com>:
> > Hey guys, getting an odd error here... The code involved:
> > $master_socket = socket_create_listen($this->port);
> > socket_bind($master_socket, '127.0.0.1', $this->port);
> > socket_listen($master_socket);
> > socket_set_option($master_socket, SOL_SOCKET, SO_REUSEADDR,
> > socket_set_nonblock($master_socket);
> > And I'm getting:
> > 'PHP Warning: socket_bind(): unable to bind address : Invalid
> > in /home/luke/talkserver/new/classes/server.php online 30'
> > $this->port is valid, I've checked both this and that
> > seems to be executing correctly.
> > I'm a bit lost on the error too it seems to be what the php.net manual
> > are the parameters?
> > I'm trying to create a listening socket server that binds to a port on
> > local machine.
> > Thanks in advance for any help!
> What port are you trying to bind to? If it's <= 1024 then you need to
> run it as a privileged user.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Unfortunately that doesn't make a difference :(