Turning Off Debug Mode#

The admin panel shows this warning at the top of every page while the application is running in debug mode:

Debug mode is on. Error messages may show technical details that should stay private.

In debug mode, error messages include technical details about the application that are meant for troubleshooting, and anyone who triggers an error can see them. Debug mode should only be on while SynergyCP Support is working on a problem with you, and should be turned off again afterwards.

Turn debug mode off#

Log in as the root user on the SynergyCP master host.

  1. Open /scp/etc/php.env in a text editor and set:

    APP_DEBUG=false
    
  2. Apply the change:

    cd /scp
    VERSION=$(docker service inspect scp-bm-app_php_server --format '{{.Spec.TaskTemplate.ContainerSpec.Image}}' | sed -e 's/@.*//' -e 's/.*://')
    ./bin/scp-apply-docker-changes "$VERSION"
    

    This restarts SynergyCP on the version that is already installed. Expect the panel to be unavailable for about a minute.

  3. Reload the admin panel. The warning is gone.

Editing the file is not enough, and neither is restarting Docker or rebooting the server: SynergyCP keeps using the old value until the change is applied with the command above.

The warning is still there#

Check the value the application is running with:

/scp/bin/scp-exec php_s printenv APP_DEBUG

If this prints true, make sure /scp/etc/php.env has a single APP_DEBUG line, set to false, and apply the change again. If it prints false and the warning is still shown, contact us.