Support » Plugin: Wp-Insert » Geo Targeting has encountered an error – mbstring

  • Resolved gidlob


    Can you help me here ? All my adds show on all languages and I get this error:
    Geo Targeting has encountered an error, Please contact your web master. ERROR DETAILS : Please enable PHP mbstring extension on your server.
    My server have these settings:

    Multibyte Support enabled
    Multibyte string engine libmbfl
    HTTP input encoding translation disabled

    mbstring extension makes use of “streamable kanji code filter and converter”, which is distributed under the GNU Lesser General Public License version 2.1.

    Multibyte (japanese) regex support enabled
    Multibyte regex (oniguruma) backtrack check On
    Multibyte regex (oniguruma) version 4.7.1

    Directive Local Value Master Value
    mbstring.detect_order no value no value
    mbstring.encoding_translation Off Off
    mbstring.func_overload 0 0
    mbstring.http_input pass pass
    mbstring.http_output pass pass
    mbstring.http_output_conv_mimetypes ^(text/|application/xhtml\+xml) ^(text/|application/xhtml\+xml)
    mbstring.internal_encoding no value no value
    mbstring.language neutral neutral
    mbstring.script_encoding no value no value
    mbstring.strict_detection Off Off
    mbstring.substitute_character no value no value

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi, I got the same error.

    Geo Targeting has encountered an error, Please contact your web master. ERROR DETAILS : Please enable PHP mbstring extension on your server.

    My php mbstring is enable.

    Plugin Author namith.jawahar


    Max Mind Geo Targeting (The service which I chose due to its reliability) is messy and really difficult to debug if something goes wrong. I will be moving to another service (if available for free) in the upcoming release

    I installed the WP-Insert plugin ( and get this error on every page of the admin. Can someone tell me how to turn this feature off? We have no use for it and it doesn’t need to be running to begin with.

    Plugin Author namith.jawahar


    There are about 50 different locations in the plugin where you can utilize Geo IP functionality. Checking if the feature is required in all these instances and acting upon the result will be a really heavy performance penalty. As a work around the plugin detects the users location at start and use it through the plugin options (thereby saving upto 50 different high CPU usage scenarios).

    Now you can understand why even if you, in your particular situation doesn’t need GEOIP functionality the plugin still has to load is as it cannot know before hand if you have used the feature anywhere on the site (you can insert a template tag any number of times on any location in the theme).

    The error you are seeing is because your server has disabled PHP mbstring (this is a popular library). You can either ask them to activate MBSTRING or you can open the plugin folder and go to includes/common/countries.php and comment/delete line 7 (include(WP_INSERT_DIR.’/includes/common/geoip/’);)

    Thanks for the informative reply, but the functionality of the plugin sounds inefficient in relation to this error. Even if the plugin only checks geo location at beginning of running, it should still say “not loaded” or “can’t find” or something that prevents it from showing a pointless error throughout. I’ve programmed things like this and lazy loading and efficient programming prevents the performance hit if something is not loaded or required. I’ve already emailed the developers about this however.

    I can activate mbstring or disable the line in countries.php but this still seems unnecessary for a plugin error of an unused feature.

    Plugin Author namith.jawahar


    The issue is; GEO IP is a big and constantly updated module and hence we cant add in any validation inside the GEO IP module.
    In your case this was MBSTRING for another server it can be another module and there can be dozens of different modules accessed by GEOIP internally. You can see that I am testing for MB_ Library inside of WP-Insert but GEOIP is a module over which we have no control and the error originates from inside the library.

    In most cases the built in checks disables GEOIP and shows a Notice in the Admin (People apparently complains about this too!) but in some cases the error is not propagating outside of GEOIP to be caught and safely handled.

    This is an identified problem area and I will probably just use the GEOIP Database and write my own code for the API thereby resolving over 90% of the reported issues. The area of concern is the constant updates to GEOIP Database and its format

    OK thank you I would be happy with you taking the least problematic solution. I will see what I can do about mbstring with minimal system impediment.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Geo Targeting has encountered an error – mbstring’ is closed to new replies.