skip to Main Content

I have a symfony 5.1 application under development on my laptop.
This command failed:

symfony console server:start

Your token has been revoked, please login again

Then, the prompt purposes me to login, but I cannot always login, because I’m behind a firewall that rejects external access for some security reasons.

I tried :

  • to uninstall the local certificate authority,
  • to launch server without TLS,
  • to launch server with the command symfony serve -d (I got the same error message)
  • to launch application with different version of PHP (by using .php-version file)

It’s perhaps because I tested a demo symfony cloud which is expired. So, I tried to remove all elements about cloud.

Without success…

As soon as I am offline, the server can be started.
As soon as I’m connected on other network I can login, but I want to launch this local server when I’m on our enterprise network. (And I’m tired to disconnect from network)

2

Answers


  1. If I got this right, you want to start your server only locally right?

    symfony serve -d
    

    The -d flag starts the server in the background. You might want to install the certificate in order to serve https:// with the following command: symfony server:ca:install. Both commands are issued inside the root directory of your project.

    Once you’re done, go into the root directory where you started your server and type in this command to stop the server: symfony server:stop

    This should give you a local web server with your symfony project.

    FYI: In case you have installed several PHP-Versions you might need to pick a specific one by saving a .php-version file to your root directory:

    For any 7.x version:

    echo 7 > .php-version
    

    For 7.2 version:

    echo 7.2 > .php-version
    
    Login or Signup to reply.
  2. I had a problem like this. It helped me – symfony account:logout

    Here I found the answer – https://github.com/symfony/cli/issues/281

    edit by Alexandre: I only had to logout from cloud. Because of the firewall rules, symfony detected that Internet was available and try to get a new token, but fails because of firewall rules.

    Now I only have to disconnect from cloud when I am connect on enterprise network:

    symfony account:logout

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search