简体   繁体   中英

codeigniter: Message: Module 'mysqli' already loaded

I'm setting up a new project in codeigniter and after uploading all files to the live server, I got this error upon loading the website:

A PHP Error was encountered

Severity: Core Warning

Message: Module 'mysqli' already loaded

Filename: Unknown

Line Number: 0

Backtrace:

It's given line number 0 and I don't where I made the mistake. I'm not getting this error in localhost. Can anyone tell me how to fix this?

You're trying to load the php module the second time. It's probably already set to load in php.ini file, and you try to load again dynamically somewhere inside your project. You could either comment that line inside php.ini and restart Apache, or find and delete the line that could be something like

dl('php_mysqli.dll'); // on Windows 

or

dl('mysqli.so'); // on Linux

,somewhere inside a .php file.

Better yet, test before attempting to load:

if (!extension_loaded('mysqli')) {
    dl('php_mysqli.dll');
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM