Fork me on GitHub

[solved] Fatal error: Call to undefined function mb_regex_encoding() in ...includes/pnAPI.php on line 76  Bottom

  • I get this error when trying to upgrade. It looks like it has to do with Utf8. Does anyone have a suggestion on how to fix this? I am in the process of upgrading several sites. For some reason my sites are using: latin1_swedish_ci . If I have to switch these to utf8 is there a way to do this through phpMyAdmin quickly? I am with a hosting service and can access my MySql database through phpMyAdmin.

    If changing to utf8, phpMyAdmin has many to choose from would I just choose utf8_bin or utf8_unicode_ci?

    Marc



    edited by: marc@marcpare.com, datetimebrief
  • Export your full database and search and replace CHARSET=latin1 to CHARSET=utf8 and save back in UTF-8 encoding. Then drop all your tables in your live site and import your new UTF-8 encoded tables. This only covers your database. You may need to convert your modules?

    Note: Sometimes it is very hard to import large databases. Make SURE you select all your tables in phpMyAdmin and repair prior to exporting. This will not only clean your database, but will slim it down. Sometimes it could decrease the size by 50%...

    It's also possible that you may need to have your hosting site import your new database for you. It might be prudent to contact them and make sure they can do this for you. If they can then just do the conversion and transfer the completed .sql file to them and instruct them to replace the complete database for you. make SURE you keed an original backup just incase something goes wrong.



    edited by: mesteele101, datetimebrief
  • Thanks for the info. When you say search and replace ... do I do this in a text editor? As you can tell this is a little new for me.

    I am using Linux.



    edited by: marc@marcpare.com, datetimebrief
  • If you use Linux you are gifted with the option to use the CLI for such nasty operations:

    Code

    cat dumpfile.sql | sed -e  's/CHARSET=latin1/CHARSET=utf8/g' > dumpfile.new.sql

    Greetings,
    Chris

    --
    an operating system must operate
    development is life
    my repo
  • slam

    If you use Linux you are gifted with the option to use the CLI for such nasty operations:

    Code

    cat dumpfile.sql | sed -e  's/CHARSET=latin1/CHARSET=utf8/g' > dumpfile.new.sql

    Specially with big files this is the only way to do it, because your editor might not be able to open them any more.
    Greetings,
    Chris


    --
    an operating system must operate
    development is life
    my repo
  • Thanks for the help. I have made the changes but still get the same message. Maybe it doesn't have to do with the utf8 settings. Could it be something else?
  • slam

    slam

    If you use Linux you are gifted with the option to use the CLI for such nasty operations:

    Code

    cat dumpfile.sql | sed -e  's/CHARSET=latin1/CHARSET=utf8/g' > dumpfile.new.sql

    Specially with big files this is the only way to do it, because your editor might not be able to open them any more.
    Greetings,
    Chris


    If you are on Windows use 'Notepad ++. It's an amazing free editor!
  • Thanks for the help again.

    I found this in other discussions:

    http://community.zikula.org/module-Forum-viewtopic-topic-57285-start-0.htm
    http://community.zikula.org/module-Forum-viewtopic-topic-57320-start-0.htm
    http://community.zikula.org/module-Forum-viewtopic-topic-55964.htm

    How would I know if multi-byte functions are enabled? My host uses PHP 5.2.11

    Marc



    edited by: marc@marcpare.com, datetimebrief
  • make a file called testinfo.php with

    Code

    <?php phpinfo;
    in side then call it from the browser. The search for mb_string. You absolutely need mb_string if you want to use Zikula. If your host doesn't support it, move hosts - most do.

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • Thanks for the help everyone. My hosting service corrected the problem and everything upgraded properly. The problem was with multi-byte functions being enabled under PHP.

    Is there a way to tag the subject line of this thread as [SOLVED] ?

    Marc

This list is based on users active over the last 60 minutes.