The mysqli class from php does not load, sporadically
Get the solution ↓↓↓For some time now, my server with centos6 and cpanel, is giving me the following error, randomly and from time to time, at least 2 or 3 times a day.
PHP Fatal error: Uncaught Error: Class 'mysqli' not found in /home/.../db.driver.mysqli.php:100
The problem is that php is well configured, and the web works, I only get this error sporadically. I find out, because I have a function reading the error_log file, and it sends me the errors by mail every 5 minutes. I can't understand how it can only happen from time to time, and I can't reproduce the error by hand. La linea que produce el error, simplemente dice:
$this->mysqli = new mysqli(...);
Installed packages: Apache 2.4
- config
- config-runtime
- devel
- mod_asis
- mod_authn_anon
- mod_authn_socache
- mod_bwlimited
- mod_cgid
- mod_deflate
- mod_env
- mod_expires
- mod_headers
- mod_http2
- mod_mpm_worker
- mod_proxy
- mod_proxy_ajp
- mod_proxy_fcgi
- mod_proxy_http
- mod_proxy_wstunnel
- mod_security2
- mod_ssl
- mod_suexec
- mod_unique_id
- mod_version
- tools
PHP 7.3
- libc-client
- pear
- php-bcmath
- php-calendar
- php-cli
- php-common
- php-curl
- php-devel
- php-fileinfo
- php-fpm
- php-ftp
- php-gd
- php-iconv
- php-imap
- php-litespeed
- php-mbstring
- php-mysqlnd
- php-opcache
- php-pdo
- php-posix
- php-soap
- php-sockets
- php-xml
- php-zip
- runtime
Additional Packages
- apr
- apr-devel
- apr-util
- apr-util-devel
- brotli
- cpanel-tools
- documentroot
- libargon2
- libcurl
- libmcrypt
- libnghttp2
- libxml2
- modsec-sdbm-util
- nghttp2
- openssl
- openssl11
- php-cli
- php-cli-lsphp
- profiles-cpanel
- tomcat85
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: installation failed, reverting ./composer.json and ./composer.lock to their original content.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.