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
Symfony tool --port flag does not set port to access the website by the browser when used with php-cli #343
Comments
You can (and should) use the first port displayed (45431) which does match the one you asked for. The fact that the PHP web-server is used under the hood and runs on port 45443 is not stable. |
@flip111 the order of servers is actually |
@tucksaun maybe the log message showing that port 45443 for the internal webserver should mention that this is not the port that should be connected to directly to remove confusion. |
the log message is directly streamed from PHP IIRC |
Well, there are 2 lines mentioning that port 45443. The second one is directly streamed from PHP but the first one comes from the webserver. Here, we might mention that this port 45443 is an internal implementation detail and should not be accessed directly. |
I tried it a few times and it didn't work to connect to this port and the other one did work. Maybe i overlooked something not sure, but i tried like 10 times. What else could i look at? |
By the way i found this thread #42 where a bunch of poeple posted saying it started to work after they installed php-fpm. Indicating that for their scenario php cli only does not work as they expected. |
why not. any suggestion regarding the wording? alternatively we could lower the message levels so that they are not shown by default? |
not sure but logs and/or error messages could help us narrow down the potential issue.
this thread is about something else. as far as I know everyone in this thread was able to reach the CLI on the first advertised port. |
Notice that server says
[OK] Web server listening
with addresshttp://127.0.0.1:45431
but then on the last line PHP development server says it started on another addresshttp://127.0.0.1:45443
. The latter is the actual address the server was hosted onA technical explanation was given by @stof that under the hood two servers are used (one proxy server)
What would be cool is that instead of "find available port" you could configure the actual port you have to connect to with the browser.
symfony-cli/local/php/php_server.go
Line 90 in aa0ebf2
The text was updated successfully, but these errors were encountered: