• Resolved Ken Chan

    (@ckykenken)


    I recently enabled multibyte string option because I need it for AMP to show Chinese words correctly and now I can’t send my backups to cloud drives because of that function. Will there be any methods to keep these two plugins working?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Ken Chan

    (@ckykenken)

    UPDATE: I added a code into .htaccess inside the wp-admin directory so that mbstring function is disabled only in wp-admin, but I still get this error: “Dropbox error: Error in call to API function “users/get_current_account”: request body: could not decode input as JSON (400)” though I found it backing up to google drive successfully (at least for “database only” option, yes) so it is just half of the solution. Is there any “full” solution for this issue?

    • This reply was modified 6 years, 7 months ago by Ken Chan.
    Plugin Author David Anderson

    (@davidanderson)

    Hi,

    The option you mention is deprecated – https://php.net/manual/en/mbstring.overload.php (“Relying on this feature is highly discouraged.”) – because it has horrible side-effects. So you will have to stop using it eventually…

    Only *some* of the remote storage methods in UD are affected by its behaviour. Others aren’t. Dropbox and Google Drive have problems. I think those might be the only two, but I am not sure. You could try Amazon S3.

    David

    Hi,

    @ckykenken @davidanderson

    In mb strings there are multiple function and which some are deprecated and others are not.
    So we don’t use the deprecated function like “mbstring.func_overload string”.
    We use “stable mb_convert_encoding” function.
    So you can try it on.

    Plugin Author David Anderson

    (@davidanderson)

    @beingsmart In Ken’s case, when 1MB of data was being read from a file (requested with fread() and passing 1MB as the amount to read), only 768Kb was coming back – but strlen() counts it as 1MB. When I’ve seen this before, it’s caused by the function overload. Since Ken mentions using mbstring overloading, it seemed that this must be what is happening in his case.

    Ken, what exactly is it that you are doing? When you say “I recently enabled multibyte string option”, what is it that you are doing?

    Thread Starter Ken Chan

    (@ckykenken)

    Yes, I did enable mbstring for the site in order to use the AMP function properly. However, the sub-function overloading causes some functions of Updraftplus to malfunction. Even setting the overloading value to 0 can’t help. I found a way to disable mbstring in wp-admin and I did. Error throw out when I choose Dropbox but Google drive doesn’t, yet both can have backups uploaded properly. So I am wondering is disabling mbstring in wp-admin a real solution for this.

    Plugin Author David Anderson

    (@davidanderson)

    @ckykenken The encryption library which UpdraftPlus relies on – https://github.com/phpseclib/phpseclib/issues/762 – does not handle mbstring.func_overload. So, unfortunately, the parts of UpdraftPlus that go through that library can’t work with mbstring.func_overload on. The writers of the library consider that that mbstring.func_overload is a bad idea, and the creators of PHP agree and have deprecated it (I agree too – its purpose is to change the behaviour of a fundamental PHP function for calculating the length of a sequence of text, and it effectively breaks that calculation by assuming that all sequences of text are meant for humans, which isn’t true). As such, the only real solutions are to a) turn it off or b) switch to a remote storage method (e.g. FTP or AWS S3, I think) which aren’t affected by it.

    Hi @davidanderson

    Pardon for my lack of knowledge on mbstring, so kindly enlighten me if I come out as ignorant.

    The mbstring.func_overload does not work with the UpdraftPlus but we do not use that in the AMPforWP plugin.

    We use another sub function of mbstring, not the overload one.

    Is it just possible to disable mbstring.func_overload and not others?

    Plugin Author David Anderson

    (@davidanderson)

    @ahmedkaludi

    Ken Ken has specifically said that he’s using function overloading. So, whatever your issue that you’re facing is, it appears to be different to Ken Ken’s. Can you open a separate topic, please, so that things don’t get confused?

    Thread Starter Ken Chan

    (@ckykenken)

    Is it just possible to disable mbstring.func_overload and not others?

    Same for me
    I disable mbstring before using AMP is because of func_overload

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘UpdraftPlus or AMP – can’t have both’ is closed to new replies.