Luminusss
Luminusss

Reputation: 571

Fatal error: Call to undefined function mb_detect_encoding() in C:\apache\htdocs\phpmyadmin\libraries\php-gettext\gettext.inc on line 177

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:

Fatal error: Call to undefined function mb_detect_encoding() in C:\apache\htdocs\phpmyadmin\libraries\php-gettext\gettext.inc on line 177

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!

Upvotes: 2

Views: 31251

Answers (2)

Luminusss
Luminusss

Reputation: 571

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

In the php.ini file extension_dir= needs to be set to "C:\php\ext" 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 extension=php_mbstring.dll extension=php_exif.dll extension=php_mysqli.dll

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

Upvotes: 12

Akash
Akash

Reputation: 5012

Rename the php.ini-development to php.ini and enable/add

extension=mysqli.dll
extension=mbstring.dll 

Do restart apache after this change

Upvotes: 5

Related Questions