How do i remove the mysqli error on php 7.2 - php

I am facing an error with PHP 7.2:
The mysqli extension is missing. Please check your PHP configuration.
See [a#doc/html/faq.html#faqmysql#documentation]our documentation for
more information.
Does anybody know how to fix this?
I got PHP 7.2 and I have in the php.ini file: extension=mysqli.

You can check this question on SO. There are other solution. Try out which works for you.
The mysqli extension is missing. Please check your PHP configuration

I had this issue recently where I have PHP 7.2 and I have in the php.ini file: extension=mysqli. uncommented and the extension was in the ext/ folder.
The issue was that I had uncommented another line:
Default Value: -1 (Unlimited)
I am not sure why this caused an issue with the mysqli extension, but it did and it took me a long time to debug. Someone else smarter than me might be able to provide an answer.
Most people will probably solve the issue by making sure the mysqli extension is uncommented in php.ini and available in the ext/ folder.

For Windows:
Go to the php.ini file, search for "extension=msqli".
Then beneath the above line is a path indicating where the extension is gotten from in your C:\ drive. Now you can either change this to ".so" or ".dll" depending on what you have in your PHP extension folder.

First of all Sorry if it is too late to help and for my bad english writting : maybe this will work for you if none of the other given solutions did not work , so try this one :
in your httpd.conf ( apache configuration file ) , find out the line that shows the PHPinitDir , it may looks like this :
PHPIniDir "C:\Program Files\PHP\\"
in this line , try to remove the last backslash so that it becomes like this :
PHPIniDir "C:\Program Files\PHP"
lastly restart apache server so that it updates this new config ...
Hopes it helps
Thank you and Good luck

in my case it fixed by deleting browser cookie!

Try the below steps. This should solve your problem.
In file php.ini find the link that says extension=mysqli.
Replace by: extension="C:\php\ext\php_mysqli.dll".
Restart apache.

Related

How to override the php.ini file settings in laragon?

When i upgrade my php version from 7.1 to 7.2 there is new folder include in
c:\laragon\bin\php
which is right. But when i edit the php.ini file and enable openssl and other extension, save it and restart than it will override by the previous php.ini. It happens to two three times. I think there is a global php.ini file. If it has then how can we override this php.ini files with other versions php.ini?
If anyone knows please describe it or give me suggestion. Thanks
I think you just installed php incorrectly in laragon, check the folder "C:\laragon\bin\php\php-7.3.21\ext" and if this folder is empty then that would mean there is no extension, even after activation it will not change the "php.ini" file. I had the same problem.
Looks like the response
I think there is a global php.ini file
..is wrong. Please change anything (extension) in the specific php directory that you will use. This is the php directory of laragon on my local, if I will use php version 8, then I change the php.ini file in "php-8.0.8-nts-Win32-vs16-x64".
Like this:

Weird ungrammatical PHP error msg when trying to set upload folder

I've been getting this error, verbatim:
// PHP setup Edit php.ini (try /usr/local/php5/lib/php.ini search for "tmp" and make sure file uploads are, and that you have a tmp director of that name, with permissions set. To load the new php.ini, restart apache: apachectl restart
What's weird about this, besides the grammatical flaws, is that I get it no matter what I set upload_tmp_dir to in php.ini...or even if I remove php.ini entirely.
I do an apachectl restart after each change. I've also tried rebooting.
I believe I'm editing the right php.ini, because it's the one listed when I do a phpinfo(): /usr/local/php5/lib/php.ini. It lists whatever upload directory I edit into it.
This happens under Mac Lion with both Chrome and Firefox
phpinfo tells me I'm running PHP Version 5.4.6
I am the opposite of an expert.
Thanks for whatever help you can give me. I am preparing to D'oh slap myself.
It was indeed a comment in a buried file. Aaarrrggghh! Thanks to do those who offered suggestions. I am equally grateful and embarrassed.

XAMPP and cURL not working, after uncommenting php.ini

Someone else with the same problem still didn't get a decent answer/fix for my problem:
Before you comment or criticize, please make sure you read my proceedures below so as not to repeat what I've seen 100x already in Google and Stack Overflow...
XAMPP (Lite) installed on Windows 7 in C:\xampplite (newest version, only one php.ini file in C:\xampplite\php)
XAMPP and PHP scripts run correctly in http://localhost/
libcurl installed (by XAMPP default) in C:\xampplite\php\ext\php_curl.dll
php.ini edited and saved for removal of ; at beginning of line extension=php_curl.dll
php.ini default for extension_dir = "C:\xampplite\php\ext" correct and left alone
Apache service restarted in Windows Services
Computer restarted
Apache service (manually) restarted again
phpinfo(); still does not display anything with the word "curl" in it
Still no success
Thanks in advance.
I had the exact same problem but could not find the solution online.
Every site I saw said to uncomment "extension=php_curl.dll" which didn't fix the problem.
I finally solved it by adding the path to curl.dll to the variable.
That is, I changed: extension=php_curl.dll
to:
extension="F:/WebServer/PHP/ext/php_curl.dll"
Hope this helps you or somebody else.
I had a similar problem except for error reporting. Searched all over the internet and all I found was "modify the php.ini file". I modified all the php.ini files but I was still getting the same error. Turns out WAMP has visual settings which I believe overwrite the php.ini. So to turn on curl, you'd left click on XAMPP icon in your start start menu -> PHP -> PHP Settings -> php_curl (make sure it is checked).
Maybe this is your problem.
Hope it helps.
-c0d3
Try executing curl
xampp/apache/bin/curl.exe
with admin privileges.
Restarting the PHP server will do.

mysqi extension is missing

I had uncommented the 'extension=php_mysqli.dll' in the PHP config file but I'm still getting the error message that my mySQLi extension is missing. What else do I verify?
After restarting your web service, check PHP info:
phpinfo();
Does the extension appear there? If so, it loaded correctly. If not, you are likely missing the DLL, or have the wrong extension path.
Look for something like this:
For anyone else using ubuntu. I ran into this problem on a fresh ubuntu installation. I solved it by adding this line to php.ini.
extension=mysqli.so
My php.ini was located # /etc/php5/apache2/php.ini
I was also getting the same error while clicking on phpmyadmin and tried all possible solns povided in google. i tried with wamp and then reinstalling xamp.neither didnt and looked at the php.ini file.but everything was perfect. Later i realised i was selecting google chrome as my default browser while installing xamp. but then i tried opening localhost with Internet Explorer and everyhtng was fine.
Thanks
Sobbosanchi
Was on this problem for hours...
Solved it by changing extension_dir = "ext" to extension_dir = "C:/PHP-5.5.13/ext"
Seems like it doesn't like relative pathing...

PHP Sqlite Configuration in Windows Not Working

I am having difficulty getting PHP(5) on Windows to work with Sqlite. After some research, I found that I have to change the php.ini file so that it reads (without semi-colons):
extension=php_pdo.dll
extension=php_sqlite.dll
I ran the phpinfo() command, and verified that my computer is reading the right php.ini file. Additionally, I have both php_sqlite.dll and php_pdo_sqlite.dll located in an ext file located in the folder with the php.ini file. However, phpinfo indicates that the PDO drivers are "no value", and there is no indication of sqlite anywhere.
I am now stuck, because all of my resources state that the above should work. I noticed that my php.ini file has the following: extension=php_pdo_sqlite.dll and extension=php_sqlite.dll. The "extension=php_pdo_sqlite.dll" is different from "extension=php_pdo.dll" in my above example. I tried removing the extension and adding "extension=php_pdo.dll", but that did not make a difference.
Does anyone know how to resolve this issue?
Thank you,
DFM
As a resolution to this issue, I ended up installing WAMP and using a basic editor, instead of the IDE. The php.ini file was already configured so connecting to Sqlite was pretty much straight forward.
Thanks,
DFM

Categories