Support » Plugin: WebP Express » cwebp, ImageMagick, vips, and gmagick not working

  • Resolved courageous999

    (@courageous999)


    There’s a check mark next to cwebp, ImageMagick, and gmagick yet it says “An error occurred!” when attempting to test any of them as seen below:
    https://imgur.com/a/36PMIZU

    You can see here that the plugin says that they all should be operational though: https://imgur.com/hroHeZs

    My functioning cwebp is in “/usr/local/bin/”. I have ran a test of cwebp from the Command Line to make sure it works as should be (on CentOs 6.10) as can be seen in the image below:
    https://imgur.com/3yCY1yn

    It executed successfully from the Command Line. So I checked that exec() was not disabled and it isn’t as “disabled_functions” in phpinfo() is empty as can be seen in the image below:
    https://imgur.com/vvGhvWz

    EDIT:
    I just installed the “webpinfo.php” script on the site to verify what’s working and what isn’t, and apparently the plugin and that script file disagree on what’s working and what isn’t. The 1st image displays what the script says and the 2nd image displays what the plugin says:
    Script: https://imgur.com/MWC33xy
    Plugin: https://imgur.com/2FvIj7H
    Sadly regardless of what they both say, nothing is working on the plugin’s end (Anything I test returns “An error occurred!”.

    I’m losing my marbles, any idea what am I missing for all of these?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter courageous999

    (@courageous999)

    I echoed the parameters/output of the exec($cmd, $output, $returnCode) function on line 32 of webpinfo.php to the page. As you can see in the image below:
    https://imgur.com/EVdayM1

    cwebp still returns error code 126 with no output. When exec() is clearly working for the ImageMagick below, I don’t see why this is still failing?

    ImageMagick seems to return the output version successfully and in the returned output it clearly mentions webp which would mean that it is supported as well, so I see no reason why this one doesn’t work in the plugin either.

    GraphicsMagick extension should be working as well since I echoed the output of the supported formats and version number in getGraphicsMagickStatus() and both returned the webp and version number successfully. You can see this in the image below, so I still see no reason why this and ImageMagick don’t work in the plugin.
    https://imgur.com/x21KcDw

    Looking at phpinfo() I already figured out that Vips was compiled without webp unfortunately so that solves one mystery.

    UPDATE ON THE CWEBP SITUATION:
    I just ran the following tests:
    exec('ls /usr/bin', $output, $returnCode) – RETURNED SUCCESS
    exec('cwebp -version', $output, $returnCode) – RETURNED 126
    exec('/usr/bin/cwebp -version', $output, $returnCode) – RETURNED 126
    exec('/usr/local/bin/cwebp -version', $output, $returnCode) – RETURNED VERSION NUMBER

    Which meant that there was multiple binaries that were conflicting and indeed that was the case, so I copied the cwebp/dwebp binaries from “/usr/local/bin/” to “/usr/bin/” and changed their read/exec permissions to be the same as the other files in there. This solved the cwebp permission error and it is now returning the version code as expected.

    However, the plugin STILL says “An error occurred!” when trying to test any of the cwebp, ImageMagick, or gmagick extension????

    Thread Starter courageous999

    (@courageous999)

    I’m beginning to think that it is not possible to get this plugin to work with anything under CentOS 7.

    Thread Starter courageous999

    (@courageous999)

    Ok the lack of support on this plugin is literally pissing me off. First off, it would be nice to mention somewhere that there’s 0 support for CentOS 6 since I wasted tonnes of time trying to get things working there. Secondly, I literally upgraded the whole system to CentOS 7.7 to get this “AMAZINGLY” well supported plugin to work and it still gives me the “An error occurred” crap on literally anything I try. I am beyond pissed off at this ridiculous error message that couldn’t be any more vague.

    I installed v1.0.3 of libwebp from Google which worked without a hitch. Tried converting an image directly through cwebp after that from the Command line and it worked without a hitch, and was able to even view the image. So why on earth is your very smart plugin still giving “An error occurred” when I attempt to test the “cwebp” huh?

    The cwebp was installed to the “/usr/local/bin/” directory but I have even copied it to the “/usr/bin/” directory and tested both and both worked as intended from the Command Line.

    Even the “webpinfo.php” script shows that cwebp works and v1.0.3 is installed.

    By the way, GD is supposed to also be working on this OS according to your “webpinfo.php” script, but guess what your plugin says? You guessed it: “AN ERROR OCCURRED” !!!!!!!!!!!!!!!!

    Thread Starter courageous999

    (@courageous999)

    DUDE!

    Your RIDICULOUSLY SUPER LAZY “An error occured!” statement could be EASILY improved. Would have saved me WEEKS of messing around with CentOS and command lines trying to figure out the culprit to my problem with your plugin.

    If you simply change your lazy error handling in “test-convert.js” on line 150 to this:

    error: (jqxhr, status, exception) => {
                console.log(jqxhr);
                console.log(status);
                console.log(exception);
                convertResponseCallback({requestError: true});
            }

    Outputting the above 3 variables told me everything I need to solve my problem within minutes!!!!!!!!!!!!!!!

    The status variable immediately told me that the issue was a “403 Forbidden” problem. And the object responseText literally mentions “WORDFENCE” as the the reason for the 403 Forbidden. Wordfence if you don’t know is a Firewall plugin.

    The reason this was even more tricky to catch in my case (besides your utterly useless “An error occured!” message), was that I was testing this plugin in a staging environment and that meant I had to whitelist the plugin in the main site’s Wordfence.

    And to think you could be easily implementing that in this ginormous plugin!!!
    By the way, it’s “occurred” with 2 Rs.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘cwebp, ImageMagick, vips, and gmagick not working’ is closed to new replies.