• Resolved cvladan

    (@cvladan)


    Couldn’t detect why – but when switching to HHVM, import is not working anymore. It was working before on apache, on nginx as PHP-FPM, etc.

    Now, it breaks somewhere – not sure where, as it imports only part of a feed. No error messages or nothing.

    Is plugin HHVM compatible?
    I assume it is some timeout (cUrl or something) problem.

    https://www.ads-software.com/plugins/wp-all-import/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Soflyy

    (@soflyy)

    We’ve got a few reports of problems with HHVM.

    I have no idea how the users addressed them, and also don’t know if the problems are with HHVM <> WP All Import compatibility or with some other setting. I bet HHVM isn’t the only thing that isn’t standard on your server.

    Where exactly are you when it breaks? What indicates to you that it breaks somewhere? Can you send a screenshot of the user interface when it breaks?

    There’s nothing in your error log file?

    Thread Starter cvladan

    (@cvladan)

    Nothing in error log.
    You must try it to reconstruct it.

    Plugin Author Soflyy

    (@soflyy)

    Please, answer the other questions I asked.

    I’m not asking to waste your time. I’m asking because I need this information to help you.

    Where exactly are you when it breaks? What indicates to you that it breaks somewhere? Can you send a screenshot of the user interface when it breaks?

    Thread Starter cvladan

    (@cvladan)

    Thread Starter cvladan

    (@cvladan)

    So the problem is somewhere in preprocessXml_filter class.

    Plugin Author WP All Import

    (@wpallimport)

    Unfortunately we don’t offer HHVM compatibility and don’t plan to. You’ll need to work with the HHVM developers to try to isolate and reproduce the issue. If you are able to it is very likely that they’ll issue a fix.

    and any news ? I have the same problem

    Thread Starter cvladan

    (@cvladan)

    Yes. But I forgot about the fix ??

    Thread Starter cvladan

    (@cvladan)

    Kidding. I have it wrote down for me.

    Btw, the developers of this plugin are champions of stupidity saying “Unfortunately we don’t offer HHVM compatibility and don’t plan to”. I can’t believe what I’ve read – “don’t plan to offer HHVM compatibility”? So, this plugin is exclusive for amateurs, isn’t it?

    Anyway, here is the workaround: in file

    wp-all-import-pro/classes/chunk.php

    in 2 places, make changes like this:

    $path = $this->file;
    // $path = 'php://filter/read=preprocessxml/resource=' . $this->file;

    and in essence, completely avoid PHP Filter that is not compatible with HHVM. So far, I have no noticeable problems.

    The rest (the real fix) is on plugin authors that will NEVER EVER offer compatibility on HHVM. So please, can you, please call Facebook and tell them to fix HHVM to work with this plugin ??

    Hi,
    i know judging by the price of the plugin we should expect more ….

    thanks for the fix, what do you mean by6 that : avoid PHP Filter that is not compatible with HHVM,

    I have scheduled a call with Mark Zuckerberg ??

    Plugin Author WP All Import

    (@wpallimport)

    The developers of this plugin are champions of stupidity saying “Unfortunately we don’t offer HHVM compatibility and don’t plan to”

    WP All Import uses valid PHP that is compatible with any normal LAMP/LEMP stack. If HHVM throws errors processing valid PHP, then that is an HHVM bug that they need to fix.

    There are a number of open issues on HHVM’s GitHub page discussing lack of php://filter support.

    I would like to make a very easy and super fast fix suggestion to the wp-all-import team.

    To offer some kind of compatibility to your HHVM users, without compromising the filters functionality you have for the standard PHP users, I suggest the following check to see if hhvm is managing the content.

    if (defined('HHVM_VERSION')) ....

    This will return true if there is some hhvm installation active. It returns true only when hhvm is up, not just when installed! So if we stop hhvm and have php take over, it will return false, so you know exactly WHEN hhvm is taking over or php is taking over!!!

    With that, in the 3 separate locations (was 2, now its 3) of the path in the chunk.php, you can do the following….

    CHANGE THIS

    if (function_exists('stream_filter_register') and $this->options['filter']){
        stream_filter_register('preprocessxml', 'preprocessXml_filter');
        $path = 'php://filter/read=preprocessxml/resource=' . $this->file;
    }
    else $path = $this->file;

    TO THIS

    if (function_exists('stream_filter_register') and $this->options['filter']){
        stream_filter_register('preprocessxml', 'preprocessXml_filter');
        if (defined('HHVM_VERSION'))
           $path = $this->file;
        else
           $path = 'php://filter/read=preprocessxml/resource=' . $this->file;
    }
    else $path = $this->file;

    So, if there is a defined version of hhvm actively managing the php content, do the quickfix ($path=$this->file), otherwise keep the standard filtered action.

    This is a WIN-WIN situaton.
    1) You will keep the filter functionality
    2) while at the same time (for those who know the fix), you will help the hhvm users not to change the code every time there is a plugin update.
    3) (for those who don’t know the fix), will stop pulling their hair

    Plugin Author WP All Import

    (@wpallimport)

    Thanks for this! We’ll run some tests and if all is well we’ll include this in the next updates to WP All Import.

    Its more like a “hack” than a “fix”, but it will do the job.

    I would like to make a quick question please.

    What does the “filter” stand for in this code? We bypass it when in hhvm and everything “seems” to work fine, but its defenintelly there for a reason.

    By removing it, what do we miss from the plugin functionality?

    Thank you

    Plugin Author WP All Import

    (@wpallimport)

    We were holding off on HHVM support for a while and it looks like we’re going to continue to do so now that PHP7 is out and offers similar performance without these types of headaches.

    This specific code that you are bypassing helps to import XML nodes that contain symbols or colons in the element name. So as long as the data you’re importing doesn’t have symbols or colons in the element names you should be ok.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘HHVM compatibilty?’ is closed to new replies.