Posted 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
_
Care about the future of the Drupal.org forums? Please join our conversation and show support for improving the forums infrastructure.
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.
错误:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展
我已经尝试将我的drupal站点文件夹移动到站点根目录,也通过导出sql文件来移动数据库。但是当我尝试打开该网站时,我收到以下错误。
“mysqli的错误是:无法使用MySQLi数据库,因为没有安装PHP的MySQLi扩展,检查你的php.ini,看看如何启用它..”
请帮忙
注释
你不说你是否
你不会说你是在本地安装还是托管的,或者你正在使用什么版本的drupal。
但是,这个错误消息实际上是非常明确的。IIRC,要解决这个问题,可以在php.ini文件中启用mysqli扩展,或者如果你在托管环境中或者没有访问权限,可以编辑drupal安装和更改的settings.php文件$ db_url行从“mysqli”到“mysql”。
===
“给一个人一条鱼,你喂他一天,
教一个人去钓鱼,一辈子都养活他。” - 老子
“帮助那些帮助自己的人”。- 本杰明·富兰克林
“搜索是你最好的朋友”。 - Worldfallz
_
关注Drupal.org论坛的未来?请加入我们的谈话,并表示支持改进论坛的基础设施。
另一种可能性
我有完全相同的问题,我的网站已经工作了好几个月。我发现我的网站上的PHP设置已经被切换回PHP4,它不支持MySQLi。一旦我重新使用PHP5,一切都很好。
如果是托管解决方案,那可能需要考虑。
“很高兴见到你,玫瑰...为你的生活奔跑。” - 医生
与mysqli扩展相同的问题
我的主机正在运行5.2.6 php,并且没有做出任何最近的更改可能会解释最近的错误消息。我没有做任何改变,所以我很困惑。不幸的是,我不是一个php wonk,但我已经取得了一些成功使用的书籍,在这里阅读,并解释了drupal本身的消息,但这个有我。我认为将网站从6.5更新为6.8会解决它,但没有。
我决定从settings.php代码中删除对mysqli的引用,因为我的主机没有使用,看到我的网站返回!
嘿,谢谢,禁用和
嘿,谢谢,禁用和重新启用PHP5在我的cPanel也为我做的伎俩!
:)
确认PHP5
在我共享的cPanel设置中确认了这个解决方案 - 使PHP5解决了错误。
尼斯
我在媒体寺庙,它绝对已经恢复到PHP4,这是诀窍,谢谢。
修正了我的问题
这固定了我的问题。谢谢你发贴!
感谢帮助
有效 .......
谢谢您的帮助!!!
改变'mysqli'到'mysql'但仍然是问题。
我试图将我的drupal网站移动到一个新的服务器,PHP 5.2.8
我有同样的问题,所以改变了'mysqli'到'mysql'在settings.php文件夹,这里建议。
最后可以看到主页,但没有显示图像,我无法访问任何其他节点。
当我尝试去另一个页面时,我收到一条消息:'服务器找不到请求的页面'。
是因为我现在使用mysql而不是mysqli吗?
不要以为我可以访问php.ini,如果可以的话不知道该添加什么。
mysqli错误是:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展。检查你的<code>
收到错误代码
mysqli错误是:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展。检查你看看如何启用它..
php.ini
突然间。这是我主机的错吗?
注释
你必须启用mysqli看
你必须启用mysqli
看到这个:http : //php.net/manual/en/mysqli.installation.php
我有同样的错误
我试图从5.3.5升级我的PHP,当我从PHP.ini文件启用新的PHP(5.3.28)时,我重新启动Apache服务,我的Drupal网站给我以下错误。我查看了settings.php文件,但是什么我应该改变什么才能让新版本的PHP工作?任何帮助将不胜感激。
“网站离线
由于技术问题,该网站目前无法使用。请稍后再试。谢谢你的理解
如果您是本网站的维护者,请在settings.php文件中检查数据库设置,并确保托管服务提供商的数据库服务器正在运行。有关更多帮助,请参阅手册或联系托管服务提供商。
mysqli错误是:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展。检查一下,看看如何启用它。“
php.ini
我通过php.ini文件将网站重新开启,一切都恢复在线状态 即使他们在那里,扩展程序似乎不加载?
真的很喜欢一些关于什么尝试的建议吗?
安玛丽
问题排序
除了主页之外,不会看到页面的问题排序:
当我改变到一个新的服务器,我不得不将名称服务器重定向到新的服务器之前,内部drupal引用将工作。
一旦新的名称服务器过滤,一切正常。
不管怎么说,还是要谢谢你!
你好,我也是一样的
你好,
我面对同样的问题。
你能够很好地让我知道你实际做了什么吗?
这将是非常重要的。
问候。
亚青
提到的解决办法
正如我所说,我只需要将名称服务器重定向到新站点,并等待它过滤。
另外正如我在上一篇文章中提到的,我不得不将mysqli更改为settings.php中的mysql。
希望有帮助!
的.htaccess
我的第一次更新后,我有相同的消息错误,通过这个线程间接找到解决方案。
.htaccess文件被覆盖并且在更新提供商使用的PHP版本选择(OVH.com)之后缺少
SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
改为php.ini
有同样的问题,突然来临,我有点神秘...
在我的php.ini文件中,我注意到以下内容:
mysqli.max_links = 24
我把它改成了48,一切都很好。
希望这有助于其他noobs在那里谁不真的总是明白这一切如何工作:-)
我不确定是这样的。
我的mysqli.max_links为-1(无限制)。我把它设置为48,重新启动Apache / MySQL,它工作。我不认为这是固定的。我尝试重新设置为-1,看看它是否会再次崩溃,而没有。我的猜测是,只需重新启动Apache / MySQL就足够恢复。
另一种可能性
如果您在Windows上运行,则需要确保在Windows系统设置的Path变量中指向您的PHP目录。
来自 https://www.drupal.org/node/303182
mysqli错误是:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展。检查你的<code>
收到错误代码
mysqli错误是:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展。检查你看看如何启用它..
php.ini
突然间。这是我主机的错吗?
注释
你必须启用mysqli看
你必须启用mysqli
看到这个:http : //php.net/manual/en/mysqli.installation.php
我有同样的错误
我试图从5.3.5升级我的PHP,当我从PHP.ini文件启用新的PHP(5.3.28)时,我重新启动Apache服务,我的Drupal网站给我以下错误。我查看了settings.php文件,但是什么我应该改变什么才能让新版本的PHP工作?任何帮助将不胜感激。
“网站离线
由于技术问题,该网站目前无法使用。请稍后再试。谢谢你的理解
如果您是本网站的维护者,请在settings.php文件中检查数据库设置,并确保托管服务提供商的数据库服务器正在运行。有关更多帮助,请参阅手册或联系托管服务提供商。
mysqli错误是:无法使用MySQLi数据库,因为未安装PHP的MySQLi扩展。检查一下,看看如何启用它。“
php.ini
我通过php.ini文件将网站重新开启,一切都恢复在线状态 即使他们在那里,扩展程序似乎不加载?
来自 https://www.drupal.org/node/872694