Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

forced and random mbstring.func_overload


Go to End


23 Posts   15851 Views

Avatar
rndmerle

Community Member, 24 Posts

1 April 2009 at 8:29pm

Edited: 22/04/2009 11:03am

EDIT: Actually, it's NOT solved :/ I still have the warning. See post #2

Hi.

I uploaded my site to my host today (www.haisoft.fr) and I got those error in logs :

[01-Apr-2009 08:49:22] Warning at sapphire/core/control/HTTPRequest.php line 303: mb_substr_count() expects at most 3 parameters, 4 given (http://renaudmerle.fr/book-portfolio-identite-visuelle/)
[01-Apr-2009 08:49:22] Warning at sapphire/core/control/HTTPRequest.php line 303: mb_substr_count() expects at most 3 parameters, 4 given (http://renaudmerle.fr/book-portfolio-identite-visuelle/)
[01-Apr-2009 08:49:22] Warning at sapphire/core/control/HTTPRequest.php line 303: mb_substr_count() expects at most 3 parameters, 4 given (http://renaudmerle.fr/book-portfolio-identite-visuelle/)
[01-Apr-2009 08:49:22] Warning at sapphire/core/control/HTTPRequest.php line 303: mb_substr_count() expects at most 3 parameters, 4 given (http://renaudmerle.fr/book-portfolio-identite-visuelle/)
[01-Apr-2009 08:49:22] Warning at sapphire/core/SSViewer.php line 494: mb_ereg_replace() [<a href='function.mb-ereg-replace'>function.mb-ereg-replace</a>]: mbregex compile err: unmatched close parenthesis (http://renaudmerle.fr/book-portfolio-identite-visuelle/)
[01-Apr-2009 08:49:22] Warning at sapphire/core/SSViewer.php line 496: mb_ereg_replace() [<a href='function.mb-ereg-replace'>function.mb-ereg-replace</a>]: mbregex compile err: unmatched close parenthesis (http://renaudmerle.fr/book-portfolio-identite-visuelle/)

The function call is actually

$shiftCount = substr_count($pattern, '/', 0, $doubleSlashPoint) + 1;

I discovered the mbstring php module was activated with the auto-overload option set on, and thus it was replacing (without any success) the regular string functions.

I haded this line in my _config.php and it worked like a charm :

ini_set( 'mbstring.func_overload', '0' );

and this line to my .htaccess :

php_value "mbstring.func_overload" "0"

Best regards.

Avatar
rndmerle

Community Member, 24 Posts

8 April 2009 at 11:56pm

Edited: 08/04/2009 11:58pm

Actually it's not that solved :/ I still have the warning.

I do not have those errors on my local host, but the local config of the Mbstring module is the same as the one on my online host.
Here is the online phpinfo : http://renaudmerle.fr/infos.php

Anyone has an idea ?

Best regards.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 April 2009 at 3:07am

Did you ever fix this? I've got the same issue. mbstring.func_overload fixed it for a second, but then it broke again.

Avatar
rndmerle

Community Member, 24 Posts

16 April 2009 at 4:01am

Not yet.

My host's tech service is currently exploring the issue.

The error is hardly reproducible. I get the most of warnings when accessing /Security/login?isDev=1

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 April 2009 at 4:10am

Yeah, my host's tech was quick to push the problem on Silverstripe. No surprise there. I find the error is pretty intermittent, too. Please make a post here if you ever get it resolved. My client is going batty.

Avatar
rndmerle

Community Member, 24 Posts

16 April 2009 at 4:48am

Well, because this issue is harmless, I deactivated warnings display. I get warnings by e-mail and get quite spammed though :p

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 April 2009 at 4:51am

How did you do that?

Avatar
rndmerle

Community Member, 24 Posts

16 April 2009 at 5:01am

in _config.php :

Director::set_environment_type( 'live' );
if( Director::isLive() ) {
    Debug::send_warnings_to( 'me@mail.com' );
}

Then, if I still want to get warning messages printed online instead of being emailed, I add the ?isDev=1 parameter.

Go to Top