skip to Main Content

I have a PHP application using Laravel, whenever there is an error, the system will open a screen containing the error details with db connection details, the database name even the password. How can I prevent the application from showing this sensitive information.
Thank you

2

Answers


  1. APP_DEBUG=false
    

    If the APP_DEBUG value in .env is true, all details appear in the error message.

    Login or Signup to reply.
  2. When you have your app in the production mode make APP_ENV=production and APP_DEBUG=FALSE to prevent Laravel from exposing sensitive information.

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