致命错误:在第 177 行调用 C:apachehtdocsphpmyadminlibrariesphp-gettextgettext.inc 中未定义的函数 mb_detect_encoding()

2022-01-05 00:00:00 php mysql apache phpmyadmin

所以我试图让 phpmyadmin 在 Windows 7 上运行,我已经完成并安装了所有正确的程序/文件(apache、mySQL、php 等),我在右边有 phpmyadmin 文件夹放在我的目录中,这样当我尝试在浏览器中访问它时,当目录索引设置为 index.html 时,它会显示整个目录.但是,当我将目录切换到 index.php 时,出现此错误:

So I'm trying to get phpmyadmin running on windows 7, and I've gone through and installed all the proper programs/files (apache, mySQL, php, etc..) and i have the phpmyadmin folder in the right place in my directory, such that when I try to access it in my browser when the directory index is set to index.html it shows the whole directory. However, when I switch the directory to index.php i'm getting this error:

致命错误:在第 177 行调用 C:apachehtdocsphpmyadminlibrariesphp-gettextgettext.inc 中未定义的函数 mb_detect_encoding()

我查看了一些支持页面和所有内容(例如 this one) 但所有的建议似乎都没有帮助我.他们中的大多数人都在谈论编辑/php 文件夹中的 php.ini 文件,但我什至没有那个,我有一个 php.ini-developmentphp.ini-production 文件,就是这样.建议??我也尝试过重新安装 php 以查看它是否是安装问题...不起作用.请帮忙!

I've looked at a few support pages and everything (such as this one) but all of the suggestions don't seem to be helping me out. Most of them talk about editing the php.ini file in the /php folder, but I don't even have that, I have a php.ini-development and php.ini-production file and thats it. Suggestions?? I have also tried reinstalling php to see if it was an issue with the installation...didn't work. Please help!

推荐答案

该问题是由于某些扩展被阻止且扩展目录未完全设置引起的.

The issue was caused by some of the extensions being blocked and the extension directory not being fully set.

在 php.ini 文件中,extension_dir= 需要设置为C:phpext"或 php ext 文件所在的任何位置.此外,php.ini 文件中的以下扩展名也需要取消注释

In the php.ini file extension_dir= needs to be set to "C:phpext" or whereever the php ext file is located. Also the following extensions need to be uncommented in the php.ini file as well

extension=php_gd2.dll扩展名=php_mbstring.dll扩展名=php_exif.dllextension=php_mysqli.dll

另一件有用的事情是进入 phpext 文件夹,右键单击上述每个 ext 并选择 unblock 并确保它们没有设置为只读.

Another thing that helps is to go in to the phpext folder, right click on each of the above exts and select unblock and make sure they are not set to read-only.

相关文章