Help! "Unexpected error: Module 'mysqli' already loaded in Unknown on line 0"

"Something went wrong
Unexpected error: Module ‘mysqli’ already loaded in Unknown on line 0

Please report error at https://discourse.theturninggate.net

Is this some PHP madness?

Hi @parteephoto, this is caused by a misconfiguration on your host. In particular, it looks like the configuration is trying to load the mysqli module twice. Backlight does not use that module.

There are a few options to fix this:

  1. Raise this with your host’s technical support and ask them to look into it.
  2. Visit your control panel and see if you can change to another version of PHP
  3. Configure Backlight to hide the error. To do this:
  • Copy the file backlight/env.php.skel to backlight/env.php
  • Edit the file and remove the leading // from this line:
//define('SUPPRESS_STARTUP_ERRORS', true);

so that it looks like this:

define('SUPPRESS_STARTUP_ERRORS', true);

Thanks, Ben. Will simply suppressing it let me publish albums?
When I change from my current PHP of 7.3 to 7.4 I get an even longer error message. Which version of PHP does the CRG support?

@parteephoto, Backlight and all add-ons should support up to the latest version of PHP (currently 8.4) for Backlight 6. Which version of Backlight are you running!

PHP 7.3 and 7.4 are both past end-of-life. While we support them, they may have security issues. Do you have an option for a higher version?

I should have stated in my earlier comment that I recommended changing the version in order to hopefully find a version your host has configured properly rather than for general compatibility.

Making that change to suppress the error should allow you to publish, assuming the error is limited to what you first shared.

Are you able to share a screenshot of that longer message?

Hi Ben,
It’s resolved!
I was running BL5, I upgraded to BL6 and updated everything I could, including the LR export plugin The issue persisted. PHP 7.4 is the highest option I have.

After I suppressed the error, everything seems to be working again :slight_smile: Thank you so much!

And I dont love my web host. Is there one you like best these days? I’m using Netfirms but have heard Blue Host is better.

Thanks again,
Josh

We don’t recommend Bluehost any longer. Check this thread for some other options, Best Web Host for Backlight.