Comments (5)
Hey @kamyabsoft, welcome to ReactPHP! 👋
Failed to listen on "tcp://127.0.0.1:8080": Address already in use
This indicates some other process is already listening on this address (like some other Apache or nginx process). This means that ReactPHP was unable to listen on this address. Accordingly, trying to connect to this address will actually connect to that other process instead of ReactPHP.
You can try another port number or use the special port 0
to automatically assign a random free port. You can then use $socket->getAddress()
to get the assigned address.
I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍
from reactphp.
Thanks for your guidance
The method $socket->getAddress() show me free port 37423 and i us this port in my code
But again, the loading of the site was infinite for the first time. I clicked on the site address again and it gave the same error as above and not echo hello world
my adress : http://103.215.221.123/
from reactphp.
You will need to change to your listening address to your public IP or the special address 0.0.0.0:0
to listen on a random port on all interfaces. It may always assign a different port, but in your example you should be able to send a request to http://103.215.221.123:37423/
.
Also, are you running this example from the command line? Note that this should not be embedded into a "normal" PHP script using a traditional SAPI like Apache/nginx. The script will keep running forever and you should be able to connect to it as long as the process is running. You may also have to check your firewall settings if external connections are somehow restricted.
from reactphp.
Thank you very much for solving my problem .
with my isp My site address is easily loaded and shows the text Hello World
but for my friends ( check with two different isp ) my page not load . do you know why ?
website : http://103.215.221.123:37423/
from reactphp.
@kamyabsoft Happy to hear you're making some progress.
The remaining problem you're describing sounds more like a firewall issue than a problem with ReactPHP. To isolate this issue, you may also try running another server process such as nc -l 0.0.0.0 37423
and see if a connection can be established.
from reactphp.
Related Issues (20)
- Why it's named reactphp? HOT 7
- Discussion about the communication channel HOT 18
- Outdated blog posts HOT 5
- Letsencrypt + SSL version or cipher mismatch HOT 14
- multipart video streaming & only send 1 min of the video HOT 2
- Documentation is out of date HOT 2
- Same data in "on data" while cycle write HOT 6
- Connect reactphp App to cPanel HOT 5
- 5454
- Is the project still live? HOT 2
- State-Management Error - Memory leak HOT 5
- Rename `master` branches for ReactPHP projects HOT 4
- http server return "Error: socket hang up" HOT 1
- Enable GitHub Discussions for ReactPHP repositories HOT 4
- Does ReactPHP 1.3 work with ZMQ? HOT 1
- Compatibility Issues HOT 1
- Execution Error
- exit() hangs when called after getSocket(ZMQ::SOCKET_PULL) but NOT after getSocket(ZMQ::SOCKET_PUSH)
- PHP Fatal error: Uncaught Error: Class "React\Http\HttpServer" not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactphp.