azurepimcore

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 "/opt/bitnami/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 /opt/bitnami/pimcore/var/logs/.

It is possible to enable the debug mode by following these steps:

  • Edit the /opt/bitnami/pimcore/var/config/debug-mode.php file as below:

      ...
      "active" => TRUE,
    
  • Edit the /opt/bitnami/php/etc/php-fpm.d/pimcore.conf file and replace the line below:

      env[PIMCORE_ENVIRONMENT] = prod
    

    With this:

      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
    

    With this:

      SetEnv PIMCORE_ENVIRONMENT dev
    
  • Restart Apache and PHP-FPM:

      $ sudo /opt/bitnami/ctlscript.sh restart apache
      $ sudo /opt/bitnami/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 /opt/bitnami/apps/pimcore/htdocs/var/logs/.

It is possible to enable the debug mode by editing /opt/bitnami/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 /opt/bitnami/apps/pimcore/htdocs/vendor/pimcore/pimcore/bundles/CoreBundle/Resources/config/pimcore/dev.yml file:

...
toolbar: true
Last modification June 16, 2021