Switching the Profiler Storage
Warning: You are browsing the documentation for Symfony 2.x, which is no longer maintained.
Read the updated version of this page for Symfony 7.2 (the current stable version).
By default the profile stores the collected data in files in the %kernel.cache_dir%/profiler/
directory.
You can control the storage being used through the dsn
, username
,
password
and lifetime
options. For example, the following configuration
uses MySQL as the storage for the profiler with a lifetime of one hour:
1 2 3 4 5 6 7
# app/config/config.yml
framework:
profiler:
dsn: 'mysql:host=localhost;dbname=%database_name%'
username: '%database_user%'
password: '%database_password%'
lifetime: 3600
The HttpKernel component currently supports the following profiler storage drivers:
- file
- sqlite
- mysql
- mongodb
- memcache
- memcached
- redis