Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: socket_bind(): unable to bind address [98]: #73

Closed
mohamedagamy opened this issue Mar 26, 2016 · 7 comments
Closed

Warning: socket_bind(): unable to bind address [98]: #73

mohamedagamy opened this issue Mar 26, 2016 · 7 comments

Comments

@mohamedagamy
Copy link

when I try to open testwebsock.php in my localhost in linux

!/usr/bin/env php

Warning: socket_bind(): unable to bind address [98]: Address already in use in /var/www/html/websocket/websockets.php on line 23
Failed: socket_bind()

@ghedipunk
Copy link
Owner

Try changing the following line in testwebsock.php to have a different port number:

$echo = new echoServer("0.0.0.0","9000");

9001 might be a good place to start.

Take a look at what ports are currently in use on your server if you don't want to just guess at which one might be open.

You'll also have to edit client.html with the updated port number.

Closing because this is not an issue with the library, it's a specific conflict with a server's configuration. If you still need support, please feel free to continue the discussion.

@mohamedagamy
Copy link
Author

Thank you Worked with me 👍

@codem360
Copy link

PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/websoc/websockets.php on line 23
Failed: socket_bind()

I have find this issue on my aws server pls help me.
Thanks in advance.

@ghedipunk
Copy link
Owner

ghedipunk commented Apr 15, 2018 via email

@git-TXX
Copy link

git-TXX commented Jan 15, 2019

PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/websoc/websockets.php on line 23
Failed: socket_bind()

I have find this issue on my aws server pls help me.
Thanks in advance.

check your real ip with command "ifconfig"
有可能因为当前所在的是内网,只能识别内网ip

@tiagoarrf
Copy link

PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/websoc/websockets.php on line 23 Failed: socket_bind()

I have find this issue on my aws server pls help me. Thanks in advance.

$address = 'localhost';

@ghedipunk
Copy link
Owner

ghedipunk commented Dec 20, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants