Debug Pimcore errors
NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:
$ test ! -f "installdir/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."
The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.
Approach A: Bitnami installations using system packages
The Pimcore log files are at installdir/pimcore/var/logs/.
It is possible to enable the debug mode by following these steps:
Edit the installdir/pimcore/var/config/debug-mode.php file as below:
... "active" => TRUE,
Edit the installdir/php/etc/php-fpm.d/pimcore.conf file and replace the line below:
env[PIMCORE_ENVIRONMENT] = prod
env[PIMCORE_ENVIRONMENT] = dev
Edit the apache/conf/vhosts/pimcore-vhost.conf and apache/conf/vhosts/pimcore-https-vhost.conf files and replace the line below:
SetEnv PIMCORE_ENVIRONMENT prod
SetEnv PIMCORE_ENVIRONMENT dev
Restart Apache and PHP-FPM:
$ sudo installdir/ctlscript.sh restart apache $ sudo installdir/ctlscript.sh restart php-fpm
The above steps will also make the Symfony toolbar visible at the bottom right corner of each page.
To disable the debug mode, revert the changes made to the above files and restart Apache and PHP-FPM.
Approach B: Self-contained Bitnami installations
The Pimcore log files are at installdir/apps/pimcore/htdocs/var/logs/.
It is possible to enable the debug mode by editing installdir/apps/pimcore/htdocs/var/config/debug-mode.php file as below:
... "active" => TRUE,
Also, the Symfony toolbar can be shown by setting the toolbar parameter to true in installdir/apps/pimcore/htdocs/vendor/pimcore/pimcore/bundles/CoreBundle/Resources/config/pimcore/dev.yml file:
... toolbar: true