mysqli is already loaded

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

mysqli is already loaded

Post by mhsuffolk »

1.0.9.3 PHP 8.2
I know this is a tall order but in my admin error log file I am getting one of these for every page load in admin. Shop side is unaffected.

Code: Select all

PHP Warning:  Module "mysqli" is already loaded in Unknown on line 0
Any ideas as to where to start the search?


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: mysqli is already loaded

Post by ecartz »

Search case-insensitive for mysqli with a space after it? E.g.

Code: Select all

fgrep -rni 'mysqli ' admin
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: mysqli is already loaded

Post by mhsuffolk »

The only instance of mysqli followed by a space is in includes\system\versioned\1.0.8.1\database_core.php
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: mysqli is already loaded

Post by burt »

I'm going to say that it looks like something is loaded twice in php.ini
Could you contact your host and see if they can take a look at their server setup.

Although it is strange that this happens in the admin side yet not in the shop side.
I am not here to build for you.
I am here to build with you. Let's help each other.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: mysqli is already loaded

Post by ecartz »

Another possible cause is that the MySQL server needs rebooted/restarted. That gives identical symptoms to the duplicate entries in php.ini but is more likely to happen just to the admin.

It's one of those, "I don't actually know what was wrong, but restarting fixed it" problems. Not a definite answer, but worth trying.

Alternately, if you have the ability to set php.ini values on a per directory basis, you might check if you have mysqli set in both admin and catalog, duplicating it.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Re: mysqli is already loaded

Post by mhsuffolk »

I think my hosts implementation of PHP 8.2 is flawed as I had to prompt them to activate "intl" even though it was ticked in cpanel.
If I roll back to 8.0 or 8.1 the errors go away so I will stick with 8.1 until my hosts get their act together.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply