MySQLi error not found

I just deployed my site in an intermediate environment and received the following error:

Fatal error: Class 'mysqli' not found in D:\ClientSites\baileyboiler.com\www\new\php\db.php on line 11

At first, I suggested that MySQLI was simply not installed, but the start phpinfo()shows the following:

enter image description here

It seems to me that MySQLI is installed (although I could read it incorrectly). What should I do?

the code

class DB
{
    public static function GetConnection()
    {
        return new mysqli(DBHOST, DBUSER, DBPASSWORD, DEFAULTDATABASE);
    }
}

(line 11 is this return new mysql(...);)

Update

I added extension=php_mysqli.dllto my php.ini located in /Windows/php.ini(according to phpinfo()this one that loads):

Loaded Configuration File   C:\WINDOWS\php.ini

But the error persists. I know that mysqli.dll exists in C:\php\ext- because I see the file. Now what?

+3
source share
3 answers

I got a bug fixed by including / editing the following configuration in php.ini:

1st (uncomment add config):

include_path = "C:\php\includes"

2- ():

extension_dir = "ext"

3rd (uncomment edit config):

extension=D:/PHP/ext/php_mysql.dll
extension=D:/PHP/ext/php_mysqli.dll
+3

, php.ini, php_mysqli.dll apache

+1

, , :

4rd php.ini "C:\Windows". "C:\Windows", phpinfo() " (php.ini) : C:\Windows" " : C:\Windows\php.ini"

5- .

.

If I do not do the 4,5th, this also does not work for me, the output of phpinfo include_path is not configured. and extension_di is not there either. run the test also does not work.

0
source

All Articles