WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] mbstring.func_overload and PHP Warning (6 posts)

  1. EliW
    Member
    Posted 1 year ago #

    Hello, so I'd like to get some confirmation on something.

    I recently migrated a bunch of existing WordPress installs to a new host. The new host I setup fully modern, which included latest PHP (5.4.16) and all the typical default configuration that I would do.

    This included setting mbstring.func_overload = 7 -- so that all UTF-8 was properly handled.

    However, immediately after migration, my error log started filling with these errors:

    [12-Jun-2013 19:41:02 UTC] PHP Warning:  mb_stripos(): Empty delimiter in /[....]/wp-includes/functions.php on line 658
    [12-Jun-2013 19:41:02 UTC] PHP Warning:  mb_stripos(): Empty delimiter in /[....]/wp-includes/functions.php on line 661

    After doing a bit of searching, I ran into this old thread:
    http://wordpress.org/support/topic/php-warning-mb_stripos-empty-delimiter-caused-by-wp-cronphp?replies=19

    Thing is ... from reading that thread, and from playing around. I realized that the mbstring.func_overload seemed to be the issue. I checked and the old server, in fact, had it set to 0

    I changed mine on the new server to 0 ... and it INSTANTLY stopped having issues.

    But now that begs a new question:

    "Can this be right?". I would assume (especially after hearing Nacin speak at php[tek] 2013, in his keynote, about how WordPress is designed to just 'always work, no matter what the PHP config) ...

    I would assume that WordPress would work fine whether mbstring was on, or off.

    I personally don't want mbstring turned off, because I have other scripts/websites on that server that should have the mbstring on.

    So this is truly a bug in WordPress now that should be filed? That it should work correctly regardless of whether func_overload is on?

  2. Shaun Scovil
    Member
    Posted 1 year ago #

    Where is your mbstring.func_overload being set? It can only be set from php.ini (or httpd.conf), and not at runtime.

    Hope that is helpful...

  3. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    This is indeed a bug in WordPress — but it doesn't actually have to do with mbstring.

    Here's the bug report: http://core.trac.wordpress.org/ticket/23284. I'll be working on it this week and it'll make it into the next version of WordPress.

  4. EliW
    Member
    Posted 1 year ago #

    Shaun, yes, it was in php.ini

    And Nacin ... ha! So I didn't even notice that the order on those methods was wrong. Everything I found when googling the error, was pointing to func_overload.

    And in fact setting func_overload to 0 ... stopped the errors. That's weird though.

    I'm guessing (haven't looked at core) but that mb_stripos will complain about an empty delimiter, but stripos just barges ahead?.

    Thanks for the link to the bug report.

  5. EliW
    Member
    Posted 1 year ago #

    Marking as resolved.

  6. Andrew Nacin
    Lead Developer
    Posted 10 months ago #

Topic Closed

This topic has been closed to new replies.

About this Topic