Tag Archives: Fatal error: Class ‘mysqli’ not found in

[Solved] PHP Fatal error: Class ‘mysqli’ not found in xxx

Fatal error: class’ mysqli ‘not found in xxx

The error indicates that PHP lacks mysqli extension. You can check the PHP compilation parameters first to confirm/usr/local/PHP5/bin/php-i|grepconfigure

Attached are other common software queries:

nginx:/usr/local/nginx/sbin/nginx-V

apache :cat/usr/local/apache/build/config.nice

mysql:cat/usr/local/mysql/bin/mysqlbug|grepconfigure

It’s true that we didn’t enter the source code package ext/mysqli later

Linux installation is compiled with configuration, but it disappears after we have installed PHP. There is a file called phpize in the command directory bin of PHP5 folder, which can be used to generate configuration

/Usr/local/PHP5/bin/phpize// enter here to run. After execution, the configure file appears

Now add the extension mysqli

./configure –prefix=/usr/local/mysqli –with-php-config=/usr/local/php5/bin/php-config –with-mysqli=/usr/local/mysql/bin/mysql_ config

make && amp; make test && amp; make install

After compilation:

Thank you for helping to make PHP better.
Installing shared extensions: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files: /usr/local/php5/include/php/

The description is normal

Now mysqli. So appears

Modify php.ini file

extension_ Dir = “/ usr/local/PHP5/ext”
extension = mysqli. So new

I found that there are two PHP directories, which may be due to problems in the previous compilation, and both generated php.ini files. I found that they need to be modified to add the last two sentences to run normally

Finally, the generated mysqli.so file CP is put under/usr/local/PHP5/ext

Restart PHP FPM to complete the program

If you feel troublesome, you can directly delete the PHP file of compilation and installation, and the installation directory and configuration file can be recompiled and installed

If you have other questions, you can reply and learn together

Fatal error: class’ mysqli ‘not found in

/login/login_ action.html” method=”post” onSubmit=”return checkform(‘false’)”>

The php.ini file does not recognize the form and needs to be modified

Found

short_ open_ Change tag = on to on