Changing Start Date: Call to undefined function mb_substr()

Help with installation and general calendar setttings

Changing Start Date: Call to undefined function mb_substr()

Postby wheech » Thu Dec 01, 2011 2:44 pm

Hi,
Thanks Chris for the superb calendar...

I have a curious problem... locally on windows server I run OK. When i posted to live the calendar runs fine apart from when I want to change the start date to a Sunday...
I get a Fatal error: Call to undefined function mb_substr() in <path to file...>\htdocs\ac-calendar\ac-includes\functions.inc.php on line 43
Line 43 is about the UTF...
"$weekday = mb_substr($lang["day_".$k.""],0,1,'UTF-8');"
But I am thinking that this is a red herring... unless the problem is the difference in the versions of php etc.
[My hosting agent is running PHP Version 5.2.6 and I am running: 5.3.3].

I have trawled the forums and have not found anyone else with this problem... which is curious as I am running a vanilla copy of your code apart from changing the paths to accomodate the backslashes etc. for a windows environment.

Thanks in advance!
Charlie
wheech
 
Posts: 2
Joined: Thu Dec 01, 2011 2:33 pm

Re: Changing Start Date: Call to undefined function mb_subst

Postby chris » Thu Dec 01, 2011 3:04 pm

Hi,
Try changing that line:
Code: Select all
$weekday = mb_substr($lang["day_".$k.""],0,1,'UTF-8');"

to this:
Code: Select all
$weekday = substr($lang["day_".$k.""],0,1);"

That extra function was just for foreign characters so, as long as you are using it in English or other *simple* language you should not have a problem.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Changing Start Date: Call to undefined function mb_subst

Postby wheech » Thu Dec 01, 2011 4:18 pm

Yippee! Your code worked: $weekday = substr($lang["day_".$k.""],0,1);
Thanks so much for the quick response!
Cheers,
Charlie.
wheech
 
Posts: 2
Joined: Thu Dec 01, 2011 2:33 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron