PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 18, 2022

[FIXED] How can I turn on the profiler in production mode (Symfony)?

 October 18, 2022     mode, production, profiler, symfony     No comments   

Issue

I have a strange error. My Symfony app works fine in dev mode. But in production mode I am not able to save any files. So I need to turn on the profiler in production mode for a second to see what is the error. How can I achieve this?


Solution

Symfony profiler shouldn’t be in prod mode. Symfony docs : "Never enable the profiler in production environments as it will lead to major security vulnerabilities in your project."

You need to focus on your logs server. But if you want to do this.

  1. Create a web_profiler.yaml (.../config/packages/prod)

  2. Insert this content :

    web_profiler:
      toolbar: true
      intercept_redirects: false
    
    framework:
      profiler: { only_exceptions: false }
    
  3. Remove this after your found your problem

Regards



Answered By - Yohann Daniel Carter
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,207,128

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing