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.

Hosting Requirements

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

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

forced and random mbstring.func_overload


Go to End
Reply

23 Posts   9487 Views

Avatar
rndmerle

1 April 2009 at 8:29pm (Last edited: 22 April 2009 11:03am), Community Member, 24 Posts

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

8 April 2009 at 11:56pm (Last edited: 8 April 2009 11:58pm), Community Member, 24 Posts

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 : [url]http://renaudmerle.fr/infos.php[/url]

Anyone has an idea ?

Best regards.

Avatar
UncleCheese

16 April 2009 at 3:07am 4085 Posts

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

16 April 2009 at 4:01am Community Member, 24 Posts

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

16 April 2009 at 4:10am 4085 Posts

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

16 April 2009 at 4:48am Community Member, 24 Posts

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

Avatar
UncleCheese

16 April 2009 at 4:51am 4085 Posts

How did you do that?

Avatar
rndmerle

16 April 2009 at 5:01am Community Member, 24 Posts

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