Error Message on site

Hello. I made the latest updates to Backlight 5 and the galleries stopped working. The following message appears:

Something went wrong

Unexpected error: Module ‘json’ already loaded in Unknown on line 0

Thanks a lot for the help

Hello. I need help.
My galleries aren’t working and I can’t upload new ones. This has happened since I updated the last modules. Thank you in advance for your help, and I am available to talk about more personalized support, as I am starting to have a lot of problems with my clients.

@Ben will need to take a look. He will likely need Backlight Admin access as well as FTP access.
You can save some time by sending those credentials to him via direct message.
Click on his name above and then click on the Message button.

Hi @Sergio, what version of PHP are you running? This can be found by visiting Admin > Special Links followed by ‘PHP Info’.

This is caused by your host’s PHP configuration trying to load the ‘json’ module more than once. Depending on your version of PHP, the module may already be included as part of the install, so any attempt to load it elsewhere in a configuration will raise this error. A few options:

  1. If you are managing your own server, then look through the PHP config files and comment-out all but one, or even just a single item that loads the json module. The config files could be anything under /etc/php, and most likely php.ini or anything under conf.d such as ext-json.ini. The line may look like zend_extension="json.so" (though not necessarily so, as I don’t have the line to compare).

  2. See if there is a json module that you can disable in your control panel’s PHP settings

  3. If neither of the above options are available or solve this then you can suppress this error with the following steps:

  • Copy or rename backlight/env.php.skel to backlight/env.php
  • Edit the file and remove the leading // from this line so that it looks like:
define('SUPPRESS_STARTUP_ERRORS', true);

I hope that helps.

1 Like

The problem was resolved with the tips provided. Thanks a lot for the help.

2 Likes