WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] You are missing: jpegtran, optipng, gifsicle (17 posts)

  1. Den999
    Inactive
    Posted 2 years ago #

    Hello.

    I installed everything: jpegtran, optipng, and gifsicle on my VDS.
    I gived a 755 right to binaries.
    I tried to access this tools from #SU www-data and SU USERNAME and tools WORKS from command line (ssh)!

    But inside the blog i see: EWWW Image Optimizer requires jpegtran, optipng, and gifsicle. You are missing: jpegtran, optipng, gifsicle....

    And then i enable checkbox "Skip utils check" and try to optimize images.

    No results. Why ? :(

    http://wordpress.org/extend/plugins/ewww-image-optimizer/

  2. nosilver4u
    Member
    Plugin Author

    Posted 2 years ago #

    I'm assuming you've done the 'make install' command which puts the utilities in the system paths, correct? As in, you're not running them via something like /home/username/optipng/src/optipng...

    Then, what we need to know is the result of this command:
    which optipng

    Also, please ensure that you are not running PHP in safe mode, or have the exec() function disabled in PHP.

  3. Den999
    Inactive
    Posted 2 years ago #

    Hi. Look:

    # which optipng
    /usr/local/bin/optipng

    PHP Safe Mode Off

    something else may be need checking?

  4. nosilver4u
    Member
    Plugin Author

    Posted 2 years ago #

    can you run the 'which' command for jpegtran & gifsicle also?

  5. nosilver4u
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, here's another thought... What happens if you run those 'which' commands as the www-data user? If you get output, then we're ok, otherwise, something is wrong.

    I'm also going to try and put together a little debug script over the next couple days that gives a little bit more output about the tests we normally run in the background with the plugin.

  6. Den999
    Inactive
    Posted 2 years ago #

    Hello.
    Yes, i can. Look:

    # which jpegtran
    /usr/local/bin/jpegtran

    # which gifsicle
    /usr/local/bin/gifsicle

    I said you: it's works from command line, and works from another usernames too.

    Look:

    # su www-data
    $ # which gifsicle
    /usr/local/bin/gifsicle$
    gifsicle: <stdin>: is a terminal
    $ optipng -v
    OptiPNG version 0.7.1
    Copyright (C) 2001-2012 Cosmin Truta and the Contributing Authors.

    This program is open-source software. See LICENSE for more details.

    Portions of this software are based in part on the work of:
    Jean-loup Gailly and Mark Adler (zlib)
    Glenn Randers-Pehrson and the PNG Development Group (libpng)
    Miyasaka Masaru (BMP support)
    David Koblas (GIF support)

    Using libpng version 1.4.9 and zlib version 1.2.6-optipng
    $ exit

  7. nosilver4u
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, what I was looking for specifically is whether or not the 'which' command is working under the www-data user, since that is specifically how we test for the existence of the tools. I'm a bit stumped at this point, so I'm going to start brainstorming on that debugging tool.

  8. nosilver4u
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, I've got some basic info added to the plugin settings page. Please download the Development Version (over on the Developers tab/page), and paste the Debug section here.

  9. Den999
    Inactive
    Posted 2 years ago #

    Hi!

    Look:

    Debug information
    computed jpegtran path: jpegtran
    jpegtran location (using 'which'):
    computed optipng path: optipng
    optipng location (using 'which'):
    optipng version:
    computed gifsicle path: gifsicle
    gifsicle location (using 'which'):
    gifsicle version:
    safe mode: Off
    Operating System: Linux
    exec(): enabled
    getimagesize(): OK
    mime_content_type(): OK

    This plugin can't find a path to libraries? o_O

    PS. I use a Apache2 ITK.

  10. nosilver4u
    Member
    Plugin Author

    Posted 2 years ago #

    In particular, it appears the user running your webserver process can't use the 'which' command, but likely it won't find any of the others either.
    I had never heard of ITK, so I did some research, and it appears that apache ITK runs as root, and then drops each child process into limited privileges as a different user, defined in the vhost configuration. So what you need to do it seems, is actually find out what user is specified in your VirtualHost config, and find out why that user can't run any of the binaries.
    I would suspect that will get us going on the right track (hopefully).

  11. Den999
    Inactive
    Posted 2 years ago #

    Ops, you right. Apache ITK does not give permissions. Good security ;)
    And I not found a solution to this problem.

    If you can find a solution (or I'll find) - let's write here. Google is already grab this message, I think it would be usefull.

  12. KOKON
    Member
    Posted 1 year ago #

    The same problem here:
    Debug information
    computed jpegtran path: jpegtran
    jpegtran location (using 'which'):
    computed optipng path: optipng
    optipng location (using 'which'):
    optipng version:
    computed gifsicle path: gifsicle
    gifsicle location (using 'which'):
    gifsicle version:
    safe mode: Off
    Operating System: Linux
    exec(): enabled
    getimagesize(): OK
    mime_content_type(): OK

    15394 apache 15 0 57036 27m 5296 S 0.0 10.7 0:01.48 httpd

  13. KOKON
    Member
    Posted 1 year ago #

    [root@xxx ~]# which optipng
    /usr/bin/optipng
    [root@xxx ~]# which jpegtran
    /usr/bin/jpegtran
    [root@xxx ~]# which gifsicle
    /usr/bin/gifsicle

    cent os
    installed via
    yum install optipng
    yum install gifsicle
    yum install libjpeg

  14. KOKON
    Member
    Posted 1 year ago #

    p.s. i'm using ordinary apache 2

  15. KOKON
    Member
    Posted 1 year ago #

    lol i was so much sure that it is not my mistake.

    it was like this in php.ini
    ;disable_functions = exec,passthru,shell_exec,system,proc_open,popen

    so your debug is not debugging well ; )

  16. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    KOKON, please don't post your issue here unless you are using apache ITK.

    I will respond once you have started your own support thread.

  17. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    Den999, I'm going to mark this as 'resolved' in the sense that the question has been answered, and neither of us knows of a way to make the plugin work with Apache ITK. This will serve as a reference to other users to avoid Apache ITK if they want to use EWWW Image Optimizer.

    If you (or anyone else using Apache ITK) find a solution in the future, please post it for the good of all.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.