By pankajshr_jpr on
I have tried moving my drupal site folder to site root and have also moved the database too by exporting sql file. But i am getting the following error when i tried to open the site.
"The mysqli error was: Unable to use the MySQLi database because the MySQLi extension for PHP is not installed. Check your php.ini to see how you can enable it.."
please help
Comments
you don't say whether you
you don't say whether you are on a local install or a hosted one or what version of drupal you are using.
however, this error message is actually pretty explicit. IIRC, to fix this either enable the mysqli extension in the php.ini file or, if you're in a hosted environment or otherwise don't have access to it, you can edit the settings.php file for your drupal install and change the $db_url line from "mysqli" to "mysql".
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Another possibility
I had the exact same problem, after my sites had been working for months. What I discovered is that the PHP settings on my site had been switched back to PHP4, which didn't support MySQLi. As soon as I reset to use PHP5 again, all was well.
If it's a hosted solution, that may something to look at.
"Nice to meet you Rose...run for your life." - The Doctor
Same problem with mysqli extension
My host is running 5.2.6 php and they have not made any recent changes which might account for the recent error message. I haven't made any changes either so I am perplexed. Unfortunately I am not a php wonk but I have had some successes using the books, reading here, and interpreting the messages from drupal itself but this one has me. I thought updating the site to 6.8 from 6.5 would fix it but it did not.
I decided to remove the reference to the mysqli from the settings.php code since my host does not use that and behold, my site returned!
Hey thanks, disabling and
Hey thanks, disabling and re-enabling PHP5 on my cPanel did the trick for me too!
:)
confirmed PHP5
Confirmed this solution on my shared cPanel setup - enabling PHP5 resolved the error.
Nice
I am on Media Temple and it definitely did revert back to PHP4, this did the trick, thank you.
Fixed my issue
This fixed my issue. Thank you for posting this!
Thanks for help
It worked .......
thanks for the help!!!
changed 'mysqli' to 'mysql' but still problems.
I am trying to move my drupal site to a new server, with PHP 5.2.8
I had the same problem, so changed 'mysqli' to 'mysql' in the settings.php folder, as suggested here.
Finally able to see the home page, but no images are shown and I cannot access any other node.
When I try to go to another page, I get a message: 'The server cannot find the requested page.'
Is it because I'm now using mysql instead of mysqli?
Don't think I have access to php.ini, and don't know what to add to it if I could.
Would really appreciate some advice as to what to try?!
Annmarie
problem sorted
Problem not seeing pages besides homepages is sorted:
As I was changing to a new server, I had to redirect the nameservers to the new server before the internal drupal references would work.
Once the new nameservers had filtered through, everything works.
Thanks anyway!
Hello, I'm facing the same
Hello,
I'm facing the same issue.
Would you be nice enough to let me know what you actually did?
It'd be very much apreciated.
regards.
ayo
Mentioned solution in post
As I said I just had to redirect the nameservers to the new site and wait for it to filter through.
Also as I mentioned in previous post I had to change mysqli to mysql in settings.php.
Hope it helps!
.htaccess
I had the same message error after my first update, found indirectly the solution through this thread.
The .htaccess file was overwritten and lacked after update the PHP version selection used by the provider (OVH.com)
SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
change to php.ini
Had the same problem, and as it came on suddenly, I was a little mystified...
In my php.ini file, I noticed the following:
mysqli.max_links = 24
I changed this to 48, and all was well again.
Hope this helps one of the other noobs out there who don't really always understand how this all works :-)
I'm not sure that's it.
My mysqli.max_links was at -1 (unlimited). I set it to 48, restarted Apache/MySQL, and it worked. I don't think that's what fixed it, though. I tried resetting it to -1 to see if it would crash again, and it didn't. My guess is that just restarting Apache/MySQL would have been enough to recover.
One other possibility
If you're running on Windows, you'll want to make sure that you point to your PHP directory in the Path variable of your Windows system settings.