codeigniter: Message: Module 'mysqli' already loaded

后端 未结 1 713
滥情空心
滥情空心 2021-01-21 20:51

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 encount         


        
1条回答
  •  北恋
    北恋 (楼主)
    2021-01-21 21:43

    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');
    }
    

    0 讨论(0)
提交回复
热议问题