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
Similar Posts:
- Cannot load php7apache2 to server
- [How to Solve] gcc-4.7.2 cannot compute suffix of object fil…
- Solve the problem of “uncaught error: class’ mysqli ‘not found” in php7
- [Solved] Php5.6.30 environment error call to undefined function imagecreate() compile and install GD Library
- About configure error APR not found. And exports. C: error_ hack_ apu_ Solution to the problem of redefining version ‘
- [Solved] linux configure: error: no acceptable C compiler found in $PATH
- Remember to check the error of no such file or directory in PHP mysqli once
- zlib.h:no such file or directory
- [Solved] An error class’ ZipArchive ‘not found is reported after testing phpexcel
- [Solved] Fatal error: Call to undefined function json_decode()