Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:47:38+00:00 2026-06-18T01:47:38+00:00

How to disable profiler in Symfony2 in production? I do not mean the toolbar

  • 0

How to disable profiler in Symfony2 in production?

I do not mean the toolbar – I mean the profiler.

I want to disable it in production, I use it extensively for development so the solution with removing its bundle is a no-go.

I have tried setting framework.profiler.only_exceptions to true. I have tried removing the framework.profiler section altogether. No matter what the profiler.db is growing after every request and every response contains x-debug-token header.

I have double-checked the config files (config.yml and config_prod.yml) and everything seems to be fined.

What’s more the command app/console router:dump-apache --no-debug always dumps the _wdt and _profiler routes, but I don’t have them in my routing_prod.yml and they don’t seem to be present when trying to access them from the browser (404).

I’m running symfony 2.0 and I won’t upgrade right now because of some major changes in 2.1 which would require a rewrite of many elements. It wouldn’t be wise to start it just before initial deployment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:47:39+00:00Added an answer on June 18, 2026 at 1:47 am

    Symfony >= 2.2

    As of Symfony 2.2 the profiler supports an enabled flag in the framework’s configuration and is disabled by default in the test environment.

    # app/config/config_test.yml
    framework:
        profiler:
            enabled: false
    

    See this Blog entry about Profiling by Fabien Potencier and the FrameworkBundle configuration reference for more details.

    Update: This flag is still valid in Symfony 4.0.


    Symfony <= 2.1

    In Symfony <= 2.1 The profiler is disabled entirely if there’s no framework.profilerkey in the configuration.

    You can see this in the ProfilerPass of the Symfony2 FrameworkBundle configuration.

    This is the case for the default config.yml and config_prod.yml (which includes the former). So if you didn’t tinker with the default configurations you’re fine.

    In config_dev.yml however the default setting is:

    framework:
        profiler: { only_exceptions: false }
    

    Which enables profiling for the dev environment and all enviroments that import config_dev.yml like config_test.yml.

    If you want to unset the profiler value in a subsequent configuration use:

    framework:
        profiler: false
    

    Values like {} or ~ won’t unset the value. You have to use false.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to disable the Charging and Network identification in Windows phone emulator.. Is
Is it possible to disable the OData support? I dont want this automatism because
I have created a WCF service which does not use the app.config to configure
I'm using EF Code First in my new project. I'm not going to use
I would like to disable the parent windows access of scrollbars when the fancybox
Is it possible to disable Tomcats check for extended key usage which defines purpose(server,
I am trying to disable the logo in my metro app live tile so
How can I enable/disable programmatically capabilities in a metro app, i.e. capabilities settings defined
I need disable tooltip in google geo chart. I tried tooltip.trigger: 'none' and other
How can I simply disable a TkInter Listbox? It seems such a straightforward thing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.