Urgent Help needed! Fatal error: Call to undefined function mb_detect_encoding()

Permalink
I keep getting an error after installing a custom theme when I attempt to manage the theme in C5:

Clicking on 'Design' either in the C5 header bar or on the page pop up menu bring up the following error:

Fatal error: Call to undefined function mb_detect_encoding() in \\NAS43ENT\domains\m\mocohlive.com\user\htdocs\concrete\helpers\concrete\marketplace\themes.php on line 16

While clicking on any of the custom editable areas I have created in the theme bring up this error:

Fatal error: Call to undefined function mb_detect_encoding() in \\NAS43ENT\domains\m\mocohlive.com\user\htdocs\concrete\helpers\concrete\marketplace\blocks.php on line 17




I'm new to C5 and loved the way it all works and have previously messed around with customising existing themes.

craftyCS
 
craftyCS replied on at Permalink Reply
craftyCS
It appears this may be a server error as I have activated the Standard themes that coem with C5 and I get the same error... any ideas?
Remo replied on at Permalink Reply
Remo
please post a link to a site that contains a call to php_info(); it helps us to see whether your server has all the php modules it needs.
craftyCS replied on at Permalink Reply
craftyCS
www.mocohlive.com
craftyCS replied on at Permalink Reply
craftyCS
Thank you for your swift response I'm not 100% sure what you meant. How do I get a Link to a site are you meaning the site itself as I posted above?
craftyCS replied on at Permalink Reply
craftyCS
Also get this error when trying to index the site for search engines.

Utf8 compatible lower case filter needs mbstring extension to be enabled.
frz replied on at Permalink Reply
frz
he's looking to learn more about your server setup since that error sounds awfully odd..

if you goto this page:
http://www.concrete5.org/index.php?cID=5158...

there is a link to a file we ask people to post before we decide if we can even install concrete5 on the site for them. If you download that, unzip it, and upload the PHP file to a spot you can share it will help a lot.
craftyCS replied on at Permalink Reply
craftyCS
craftyCS replied on at Permalink Reply
craftyCS
Hi wondered if anyone had managed to see if there was an error on my server? (now have the client breathing down my neck ;-( )
jgarcia replied on at Permalink Reply
jgarcia
looks like you need the mbstring php extension. since you're on a windows box, you should be able to uncomment the line that says "extension=php_mbstring.dll" in your php.ini file and restart the service.
astorm replied on at Permalink Reply
astorm
Echoing what others have said here, it looks like your server is missing a standard PHP component needed for software with international character support

http://us3.php.net/manual/en/book.mbstring.php...

We'll need more information from you to figure out what's going on.

1. Create a blank file on your server and name it something like "serverinfo.php", and then copy/paste the following text in it. (or just download the file franz linked to).

<?php
phpinfo();

2. View that page in your brower, (go tohttp://www.itsnotroscience.com/serverinfo.php)...

2. Point us to that page and we'll be better able to diagnose the problem you're having.

Also, do you know who the administrator of your server is? If so, ask them to turn on the PHP Multibye extension. Beyond concrete5, almost all PHP web applications need this extension to properly handle international characters.
craftyCS replied on at Permalink Reply
craftyCS
I have included a link to the URL of where the PHP file is installed on my server for getting the configuration info in a previous post.

I have spoken to the web host:http://www.fasthost.co.uk and it appears they do not install the PHP multibyte extension on any of their shared servers. Their Tech support says that I can disable the need for it in the php script on my website is this what 'jgarcia' meant? If so does anyone know where this script might be inside the concrete directory?... (or did you mean on the main windows server which I do not have permissions to get to?)
jgarcia replied on at Permalink Reply
jgarcia
i think you could copy the file "/concrete/helpers/concrete/marketplace/themes.php" and paste it into "/helpers/concrete/marketplace/". i believe that file would then override the core file. you could then comment out the mb_string function calls:

$enc = mb_detect_encoding($xml);
$xml = mb_convert_encoding($xml, 'UTF-8', $enc);


i'm not 100% sure that that override would work but i think that it would...franz or andrew could confirm. looks like those lines just convert the marketplace themes xml file to UTF-8, so as long as it's already in UTF-8, it should be okay (not sure if it would be or not)

or you could just edit the original core file and comment those lines out, but that's definitely not best practice.
craftyCS replied on at Permalink Reply
craftyCS
One thing before I go messing around with this is that the directory "/helpers" is empty so if I am to copy the file "/concrete/helpers/concrete/marketplace/themes.php" I would have to create two new folders one inside the other then place it in is this what you meant or should the directory already exist? as it doesn't exist on any other install I have.

cheers for you help in advance
regards
Paul
craftyCS replied on at Permalink Reply
craftyCS
OK well had a bash and I now get the error:
'cannot redeclare class ConcreteMarketplaceThemesHelper' in the themes.php file inside hte directory I have just created.
jgarcia replied on at Permalink Reply
jgarcia
sounds like you did it correctly...or at least the way i thought it was supposed to be done. i take it you did create concrete/marketplace inside of the /helpers dir, but maybe i'm wrong about how that file is supposed to override the others. someone with a bit more expertise than me might could offer some more insight there.

the other immediate option would be to just edit the original file by commenting those two lines out, but be careful when doing so and make a backup.
Remo replied on at Permalink Reply
Remo
there's a reason why c5 uses multi byte stuff. You won't be able to create a japanese site without it! There's a need for it!

Would be nice if c5 prints a warning in case you don't have it but still works tho...
katz515 replied on at Permalink Reply
katz515
Yep

:-)
craftyCS replied on at Permalink Reply
craftyCS
Thank you guys, jgarcia your solution worked once I edited the original file (dodgy I know but worked a treat) I simply edited out the mbstring in both the blocks.php and the themes.php files and although there will be quite a few Japanese who will not be able to translate it I don't think the client will be too worried ;-{P}...

Love C5 guys keep up the good work

craftycs