• Resolved peterpijpelink

    (@peterpijpelink)


    hello I like your plugin and wants to use it! However, after install I tried it and gave me a warning. EWWW Image Optimizer requires jpegtran, optipng, and gifsicle. You are missing: jpegtran, optipng, gifsicle. Please install via the Installation Instructions and update paths (if necessary) on the Settings Page.

    When I try this optipng on the cmdline it works (as root). My locations I did specify but still the plugin keeps giving the same error.

    [root@ns1 /]# find -name optipng
    ./usr/local/bin/optipng
    ./var/www/vhosts/plcs.eu/httpdocs/optipng-0.7.1/src/optipng
    ./var/www/vhosts/plcs.eu/httpdocs/optipng-0.7.1/src/optipng/optipng
    [root@ns1 /]#

    So I added the /usr/local/bin/ one and also tried to other one. no luck, same for the other jpg and gif optimizer.

    [root@ns1 /]# find -name gifsicle
    ./usr/local/bin/gifsicle
    ./var/www/vhosts/plcs.eu/httpdocs/gifsicle-1.67/src/gifsicle
    [root@ns1 /]#

    no luck so far, what am I doing wrong here? I did install in the httpdocs folder of this vhost but also see the files when I run them from any other place fine.

    [root@ns1 /]# pwd
    /
    [root@ns1 /]# 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
    [root@ns1 /]#

    [root@ns1 /]# gifsicle -v
    gifsicle: <stdin>: is a terminal
    [root@ns1 /]#

    any idea? help is welcome ??

    https://www.ads-software.com/extend/plugins/ewww-image-optimizer/

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

    (@nosilver4u)

    what is the output of these commands:
    which optipng
    which /usr/local/bin/optipng

    It is possible that the ‘which’ command is not functioning properly, in which case, it is necessary to check the box on the settings page to disable the utility checks. It looks like you certainly have them installed correctly on the system, so it should not be necessary to enter any paths on the settings page.
    You can verify that things are working by running a couple images through the re-optimize on the Media Library page after you check that ‘skip utility’ box on the settings page.

    Thread Starter peterpijpelink

    (@peterpijpelink)

    Hello ! wow you are a good guy ?? quick very quick response.

    here is the output:

    [root@ns1 /]# which optipng
    /usr/local/bin/optipng

    [[root@ns1 /]# which /usr/local/bin/optipng
    /usr/local/bin/optipng

    Looks like it is the same one they use ??

    Thread Starter peterpijpelink

    (@peterpijpelink)

    Okay did as you asked, do paths in the settings and disable the check, did some images re-optimize and no savings it says. I tried all the modules on a ssh session (as user root) and they work fine, mostly –help or /? gives output for all 3.

    Plugin Author nosilver4u

    (@nosilver4u)

    well, the next response may not be so speedy, gotta go pull some weeds…
    At any rate, perhaps the web-server user does not have permissions to see those files and that is causing the issues. You can use top generally to look and see what use is running the apache process. You should be looking for something like ‘httpd’ or ‘apache2’.

    Then run this:
    ls -l /usr/local/bin/optipng

    That will tell us the permissions set on the optipng binary file.

    If it doesn’t have x in all 3 ‘sections’ that could be the issue. Binaries need to be executable by all. That can be fixed by running this command:
    chmod 755 /usr/local/bin/optipng

    Do that for all the binaries, and see what happens. You should be able to uncheck that ‘skip utilities check’ checkbox on the settings page at this point.

    Thread Starter peterpijpelink

    (@peterpijpelink)

    here is the output

    [root@ns1 /]# ls -l /usr/local/bin/optipng
    -rwxrwxrwx 1 root root 210056 Jul 7 17:13 /usr/local/bin/optipng

    hums what about the owner of the files? Can apache access them even it says root root ?

    [root@ns1 /]# ls -l /usr/local/bin/gifsicle
    -rwxr-xr-x 1 root root 419208 Jul 7 17:15 /usr/local/bin/gifsicle

    [root@ns1 /]# ls -l /usr/bin/jpegtran
    -rwxr-xr-x 1 root root 22280 Jan 6 2007 /usr/bin/jpegtran
    [root@ns1 /]#

    so optipng should work when I try pure a .png file?

    Thread Starter peterpijpelink

    (@peterpijpelink)

    Same thing, as soon as I enter the paths or without the paths and leave the box unchecked it does not work.

    media library says: Unsupported file type
    optipng is missing

    do you like to see what happens with a team viewer session on my machine?

    Thread Starter peterpijpelink

    (@peterpijpelink)

    [root@ns1 /]#
    [root@ns1 /]# chmod 755 /usr/bin/jpegtran
    [root@ns1 /]# chmod 755 /usr/local/bin/gifsicle
    [root@ns1 /]# chmod 755 /usr/local/bin/optipng
    [root@ns1 /]# ls -l /usr/bin/jpegtran
    -rwxr-xr-x 1 root root 22280 Jul 7 18:53 /usr/bin/jpegtran
    [root@ns1 /]# ls -l /usr/local/bin/optipng
    -rwxr-xr-x 1 root root 210056 Jul 7 17:13 /usr/local/bin/optipng
    [root@ns1 /]# ls -l /usr/local/bin/gifsicle
    -rwxr-xr-x 1 root root 419208 Jul 7 17:15 /usr/local/bin/gifsicle
    [root@ns1 /]#

    checked again, they are all chmod 755 now.

    Thread Starter peterpijpelink

    (@peterpijpelink)

    Just to make sure, did a find on all 3 modules

    [root@ns1 /]# find -name jpegtran
    ./usr/bin/jpegtran

    [root@ns1 /]# find -name optipng
    ./usr/local/bin/optipng
    ./var/www/vhosts/plcs.eu/httpdocs/optipng-0.7.1/src/optipng
    ./var/www/vhosts/plcs.eu/httpdocs/optipng-0.7.1/src/optipng/optipng

    [root@ns1 /]# find -name gifsicle
    ./usr/local/bin/gifsicle
    ./var/www/vhosts/plcs.eu/httpdocs/gifsicle-1.67/src/gifsicle
    [root@ns1 /]#

    do these also need to be chmod 755 ?

    Thread Starter peterpijpelink

    (@peterpijpelink)

    top – 19:05:42 up 64 days, 9:23, 1 user, load average: 0.32, 0.48, 0.52
    Tasks: 76 total, 2 running, 74 sleeping, 0 stopped, 0 zombie
    Cpu(s): 18.1%us, 1.3%sy, 0.0%ni, 80.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 8154972k total, 7074780k used, 1080192k free, 527444k buffers
    Swap: 4192944k total, 176k used, 4192768k free, 4089852k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    21644 apache 15 0 685m 87m 6792 R 17.3 1.1 0:09.28 httpd
    21714 apache 15 0 648m 58m 5452 S 16.0 0.7 0:06.34 httpd

    here is the output on the top process.

    Plugin Author nosilver4u

    (@nosilver4u)

    The permissions looked fine originally, but they should for sure work now for everyone. Just by way of explanation, and using your output for jpegtran as an example:
    -rwxr-xr-x 1 root root 22280 Jul 7 18:53 /usr/bin/jpegtran
    The first – is the directory character, which should be a – unless you’re looking at a folder. The next 3 are the permissions for the owner, the second group of 3 is permissions for the group, and the third group is for everyone else. r = read, w = write, x = execute

    so here’s the next thing I would try:

    use the switch user command to change to the ‘apache’ user, which is the one running the webserver:
    su apache

    Then try running this like you did originally:
    optipng -v

    You can type ‘exit’ or press Ctrl-D to end the apache shell and go back to root.

    Thread Starter peterpijpelink

    (@peterpijpelink)

    I am not allowed to su to apache…

    [root@ns1 /]# su apache
    This account is currently not available.

    [root@ns1 /]# su – apache
    This account is currently not available.

    However if I su to another user (my co-worker for example)

    [root@ns1 /]# su remco
    [remco@ns1 /]$ 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
    [remco@ns1 /]$

    Plugin Author nosilver4u

    (@nosilver4u)

    I was afraid of that, that user account is likely not allowed to have shell access, which makes me wonder if that is why it can’t execute the other commands. I would ask your webhost for more information about that. I’m not sure what else to do to troubleshoot this issue. If you find anything out, please post it back here for others to see.

    Thread Starter peterpijpelink

    (@peterpijpelink)

    I made a call at their support desk. Keep you updated. thanks so far for your excellent support!

    Plugin Author nosilver4u

    (@nosilver4u)

    One last thing that might help would be to set this line in wp-config.php:
    define('WP_DEBUG', true);

    Make sure to turn it back off later.

    Plugin Author nosilver4u

    (@nosilver4u)

    Another ‘last thing’… Make sure PHP’s safe mode is not turned on. I’m including a check in 1.0.8 for this, due out shortly.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Plugin: EWWW Image Optimizer] something goes wrong here…’ is closed to new replies.