Fatal error: uncaught error: class mysqli not found in windows
You haven't told us which OS you are using. But since you've already mentioned Show
Check 1 The package
Do take a note of which version you have installed, if not 7.2 like my setup you will need to change later checks to match your version. Check 2 I've just looked at my Ubuntu 19.04 setup and mysqli has it's own shared library currently installed to belonging to the
Check 3 For PHP to use the module, it needs to be instructed to load it. Depending on the way you have setup PHP to run you may need to look in a different place. But for me, running PHP 7.2 under phpfpm, the instruction to
load mysqli is located in: Check to see if you have the module loaded with:
Make sure that whichever way you are using PHP` is configured to load the module. If it is not configured to do so then you should be able to add back the configuration:
Check 3 is the most likly to be the cause given the evidence you've shown, but it's also the mos easy to make a mistake on. Uncaught Error: Class mysqli not found on Windows 10 with Apache 2.4, PHP 7.4Questions : Uncaught Error: Class mysqli not found on Windows 10 with Apache 2.4, PHP 7.42022-10-09T11:00:03+00:00 2022-10-09T11:00:03+00:00 719 System/Software:
PHP Script
Yields: We don't have mysqli!!! phpinfo php.ini directives
Looking at the phpinfo, it seems like anycodings_apache mysqlnd is loaded, but mysqli is not. I anycodings_apache don't know how to get it loaded. Question How do I load mysqli module on Windows, when anycodings_apache it seems like I already have directives in anycodings_apache php.ini to have it be loaded? Update - I found these
When setting up previous versions of PHP anycodings_apache Configuration File Path used to be anycodings_apache C:\php\php.ini. Move to C:\Windows seems to anycodings_apache be new, and that is what threw me off. If anycodings_apache someone can find a proper official docs or anycodings_apache guide where this is explained or documented, anycodings_apache I will appreciate it. I was not able to anycodings_apache successfully find proper installation anycodings_apache instructions for PHP just yet, and was going anycodings_apache by memory of my previous experiences. Total Answers 1 31 Answers 1 : of Uncaught Error: Class mysqli not found on Windows 10 with Apache 2.4, PHP 7.4My Configuration File (php.ini) Path was anycodings_apache-modules blank, and for whatever reason, PHP was anycodings_apache-modules looking for php.ini file in C:\Windows, anycodings_apache-modules and not in C:\php, where I usually had anycodings_apache-modules it in the past. I moved my php.ini file anycodings_apache-modules into C:\Windows, and it seems like we anycodings_apache-modules are happy again. 0 2022-10-09T11:00:03+00:00 2022-10-09T11:00:03+00:00Answer Link mRahman How do I fix Mysqli extension is missing?Show activity on this post.. In your Xampp folder, open php. ... . Search for extension=mysqli (Ctrl+F), if there are two, look for the one that has been uncommented (without ";" behind). Change the mysqli with the correct path address i.e extension=C:\xampp\php\ext\php_mysqli.. How do I know if Mysqli is installed?Check if MySQLi is Installed
You can do that by visiting a phpinfo() page that you made, or by running this command: php -m | grep mysqli.
How do I download Mysqli?Installing MySQL on Windows
Simply download the installer package, unzip it anywhere, and run setup.exe. Default installer setup.exe will walk you through the trivial process and by default will install everything under C:\mysql.
|