Support » Plugin: WebP Express » sh: 1: /usr/local/bin/cwebp: not found

  • Resolved esia168

    (@esia168)


    Hi, yesterday my website was down, then I see the error log, there are many of this log, not sure if it’s the cause. But why is this log happening ? I am using the cwebp that I installed in the linux server. It’s located at
    $which cwebp
    /usr/bin/cwebp

    —- apache error log —–

    sh: 1: /usr/local/bin/cwebp: not found
    sh: 1: /usr/local/bin/cwebp: not found
    sh: 1: /usr/gnu/bin/cwebp: not found
    sh: 1: /usr/gnu/bin/cwebp: not found
    sh: 1: /usr/syno/bin/cwebp: not found
    sh: 1: /usr/syno/bin/cwebp: not found
    sh: 1: /usr/local/bin/cwebp: not found
    sh: 1: /usr/gnu/bin/cwebp: not found
    sh: 1: /usr/syno/bin/cwebp: not found
    sh: 1: /usr/local/bin/cwebp: not found
    sh: 1: /usr/gnu/bin/cwebp: not found
    sh: 1: /usr/syno/bin/cwebp: not found
    sh: 1: /usr/local/bin/cwebp: not found
    sh: 1: /usr/gnu/bin/cwebp: not found
    sh: 1: /usr/syno/bin/cwebp: not found
    sh: 1: /usr/local/bin/cwebp: not found

    • This topic was modified 3 months, 2 weeks ago by esia168.
Viewing 9 replies - 1 through 9 (of 9 total)
  • just passing by…

    most system have which …

    cwebp=$(/usr/bin/which cwebp)

    that could simplify looking around where your exec is hidden

    @cantoute Hi, sorry, I don’t understand.

    That’s what I did, and it’s showing the cwebp located in /usr/bin/cwebp , but then this plugin does not look into that directory, that’s why it’s showing those error log.

    $which cwebp
    /usr/bin/cwebp

    Plugin Author rosell.dk

    (@roselldk)

    Thanks, cantoute.

    I want not only one cwebp, but preferably all. The logic calls the cwebp binaries with “-version” and picks the greatest (falls back to the other).

    But yes, no need to try out paths that can be ruled out.
    A couple of versions back, I tested with @file_exists, but that could be subject to open_basedir restrictions, producing entries in the error log.

    I have been considering using whereis -b cwebp to do the filtering. But which -a cwebp could also be an option. The “-a” flag tells it to return all.

    Which of these commands do you think would be most suitable?

    Of course, there will have to be fallback to current method if which and whereis are unavailable.

    Plugin Author rosell.dk

    (@roselldk)

    Hi @esia168.

    You can try to click “configure” on the cwebp conversion method and disable the
    “Try to execute cweb binary at common locations” option. It will still try to execute plain “cwebp”. If cwebp is in path, that should work (this reminds me that I should make an option for disabling that too)

    • This reply was modified 3 months, 2 weeks ago by rosell.dk.

    “Which of these commands do you think would be most suitable?”

    Are you asking me ? If so, I have no ideas, but my system have “which”

    so are you going to release a new update for this fix ?

    Thanks

    @roselldk Hi, got it, thanks. I have set that, will monitor.

    Plugin Author rosell.dk

    (@roselldk)

    I’m probably going to add yet another cwebp option for discovering binaries for this.

    I’m going to keep the brute force option as “which” and “whereis” apparently only finds cwebp binaries that are in PATH. So the brute force method might have success on some systems where “which” and “whereis” fails (and “which” and “whereis” could be unavailable on some systems).

    I have implemented this new option in the webp-convert library, but I’m going to wait a bit before publishing it. I want time to perhaps regretting the option or change the implementation a bit. https://github.com/rosell-dk/webp-convert/issues/226

    I’m also considering testing if the file exists before executing cwebps in common system paths in the brute force method. I had code that did this, but it produced open_basedir restriction warnings in error logs. But I guess I could suppress these. https://github.com/rosell-dk/webp-convert/issues/227

    @roselldk Thank you for your dedication and hard work on this.

    Plugin Author rosell.dk

    (@roselldk)

    Released as part of 0.17.2.

    Regarding the open_basedir restrictions, I now suppress warnings from file_exists while detecting that warning happened. In case warning happened, I use exec to find out if file exists.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.