WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Getting errors while optimizing

[Resolved] Getting errors while optimizing

  • Hi

    I have a huge blog with over 10,000 images. I am optimizing them manually in media library- 400 at a time. It optimized half of the images successfully but when I am at page 15 of media library and all subsequent pages, it shows this error in the “image optimizer” column-

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button or log data. ]

    ===================
    Warning: getimagesize(/home/xxxx/public_html/mysite.com/wp-content/uploads//var/www/vhosts/mysite.com/httpdocs/wp-content/uploads/2007/08/imagename.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/xxxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 1890
    
    Warning: filesize() [function.filesize]: stat failed for /home/xxxx/public_html/mysite.com/wp-content/uploads//var/www/vhosts/mysite.com/httpdocs/wp-content/uploads/2007/08/imagename.jpg in /home/xxxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 1904
    Unsupported file type
    ===================
    
    When I still try to optimize them by bulk selecting the images, it returns this error for each image-
    
    ===================
    Optimized image: /var/www/vhosts/mysite.com/httpdocs/wp-content/uploads/2007/08/imagename.jpg
    Full size – Could not find /home/xxxx/public_html/mysite.com/wp-content/uploads//var/www/vhosts/mysite.com/httpdocs/wp-content/uploads/2007/08/imagename.jpg
    Elapsed: 0.2 seconds
    ===================

    Please let me know whats the problem. Thanks.

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

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

    @nosilver4u

    somewhere in there, it is appending the path to what wordpress says is your uploads folder. I’m guessing that at some point you changed the upload path, and it is confusing the plugin, because it doesn’t realize that wordpress is giving the full path already. I’m sure there is someway to detect that, but not quite sure how.

    I’ll have to give it some thought and see what I can come up with.

    Plugin Author nosilver4u

    @nosilver4u

    The dev version has a fix for this (hopefully). Try it out and let me know if that fixes it. If you are uploading via ftp, you can skip all the binaries, or make sure to transfer in BIN (binary) mode.

    Thanks. I installed the dev version but it didn’t changed anything. I am still getting the same errors in media library like above.

    Also, with dev version some new errors occurred on the settings page. It says few files are missing, but I checked and they are present. Here is the screenshot of settings page-

    View post on imgur.com

    Thanks again!

    Plugin Author nosilver4u

    @nosilver4u

    Hmm, I wonder if the mime_content_type() function isn’t working quite right. I’ll have to double-check that, since I switched to using php to validate the mime-types of the binaries.

    Can you also post the md5sum info from the debug area, so I can verify that your binaries are intact?

    Plugin Author nosilver4u

    @nosilver4u

    ok, scratch the previous post. I’ve tweaked the mimetype detection stuff so it should be working properly again.

    If it isn’t, you can use the new debugging functionality. There is a checkbox on the settings page to turn it on. Once you’ve saved the setting, you will see a rather large debug log section near the bottom. If you don’t feel comfortable posting all that info (or taking the time to black out everything again), you can e-mail the info via: http://www.shanebishop.net/contact-me/

    Plugin Author nosilver4u

    @nosilver4u

    oh, and if the bulk optimize still isn’t working right (you may want to turn debugging back off when you test it), please let me know what errors/information it is giving now.

    Plugin Author nosilver4u

    @nosilver4u

    Any progress, did I get it fixed this time? I tried to replicate your issue as best I could, and it worked for me, but I want to make sure that we actually fixed your problem.

    Ok, I just checked it again by enabling the debug function. Here are the results-

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button or log data. ]

    ============
    Checking/Installing tools in /home/xxx/public_html/mysite.com/wp-content/ewww/
    wp-content/ewww permissions: 0755
    generated paths:
    /home/xxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/jpegtran-linux64
    /home/xxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/optipng-linux
    /home/xxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/gifsicle-linux
    /home/xxx/public_html/mysite.com/wp-content/ewww/jpegtran
    /home/xxx/public_html/mysite.com/wp-content/ewww/optipng
    /home/xxx/public_html/mysite.com/wp-content/ewww/gifsicle
    Linux/UNIX style OS, checking permissions
    found /home/xxx/public_html/mysite.com/wp-content/ewww/jpegtran, testing...
    /home/xxx/public_html/mysite.com/wp-content/ewww/jpegtran: 4da4092708650ceb79df19d528e7956b
    testing mimetype: /home/xxx/public_html/mysite.com/wp-content/ewww/jpegtran
    mime_content_type: text/plain
    jpegtran: libjpeg-turbo version 1.2.1 (build 20130221)
    found /home/xxx/public_html/mysite.com/wp-content/ewww/optipng, testing...
    /home/xxx/public_html/mysite.com/wp-content/ewww/optipng: 4eb91937291ce5038d0c68f5f2edbcfd
    testing mimetype: /home/xxx/public_html/mysite.com/wp-content/ewww/optipng
    mime_content_type: text/plain
    found /home/xxx/public_html/mysite.com/wp-content/ewww/gifsicle, testing...
    /home/xxx/public_html/mysite.com/wp-content/ewww/gifsicle: 44273fad7b3fd1145bfcf35189648f66
    testing mimetype: /home/xxx/public_html/mysite.com/wp-content/ewww/gifsicle
    mime_content_type: text/plain
    pngout-static: sh: pngout-static: command not found
    pngout: sh: pngout: command not found
    /usr/bin/pngout-static: sh: /usr/bin/pngout-static: No such file or directory
    /usr/bin/pngout: sh: /usr/bin/pngout: No such file or directory
    /usr/local/bin/pngout-static: sh: /usr/local/bin/pngout-static: No such file or directory
    /usr/local/bin/pngout: sh: /usr/local/bin/pngout: No such file or directory
    using: jpegtran
    generated paths:
    /home/xxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/jpegtran-linux64
    /home/xxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/optipng-linux
    /home/xxx/public_html/mysite.com/wp-content/plugins/ewww-image-optimizer/gifsicle-linux
    /home/xxx/public_html/mysite.com/wp-content/ewww/jpegtran
    /home/xxx/public_html/mysite.com/wp-content/ewww/optipng
    /home/xxx/public_html/mysite.com/wp-content/ewww/gifsicle
    jpegtran: libjpeg-turbo version 1.2.1 (build 20130221)
    GD found, supports:
    GD Version: bundled (2.0.34 compatible)
    FreeType Support: 1
    FreeType Linkage: with freetype
    T1Lib Support:
    GIF Read Support: 1
    GIF Create Support: 1
    JPG Support: 1
    PNG Support: 1
    WBMP Support: 1
    XPM Support: 1
    XBM Support: 1
    JIS-mapped Japanese Font Support:
    convert: Version: ImageMagick 6.7.6-8 2012-05-02 Q16 http://www.imagemagick.org
    disabled functions: dl
    /usr/bin/file: magic file from /etc/magic:/usr/share/misc/magic
    /usr/bin/nice: sh: /usr/bin/nice: No such file or directory
    nice: 15
    tar: tar (GNU tar) 1.23
    user: xxx
    operating environment: Linux 3.2.38 #11 SMP Sat Feb 16 20:42:35 CST 2013 x86_64
    ==============

    The bulk optimizer is still not working. Thanks for your efforts.

    Plugin Author nosilver4u

    @nosilver4u

    aha, so the mimetype functions in php are broken in your system, since they are detecting the executables as text/plain…
    I’ll rework the detection a bit to fail-over better.

    Are you seeing the same errors on the bulk, or just having trouble because I broke the tool detection?

    Plugin Author nosilver4u

    @nosilver4u

    Ok, it should fall-back properly to the ‘file’ command now. If the bulk still is busted, turn on debugging, and post one of the sections that gets generated when it fails to optimize an image.

    Its still the same errors, no change.

    Debug- same error as above.
    Bulk optimize- same error as above.

    Plugin Author nosilver4u

    @nosilver4u

    The bulk optimize should have extra information in it as well, that’s what I was hoping to see. Not sure that it will help a ton, but there might be a clue.

    Anyway, I figured out the problem with the binary checks (or at least another one), and tested it with similar settings to what your debug showed, and it seems to be working now for me.

    You can try the latest dev version to see if that fixes the status on the tools. I’m going to add in some extra debug information to try and pinpoint the issue with those old images though.

    Plugin Author nosilver4u

    @nosilver4u

    Ok, the new debug information should help me figure out what is going on, and better replicate your setup. I just uploaded the latest code a couple minutes ago. Install that, and then turn on debugging, and then try to optimize one of the images in question. Once it attempts an image, copy the (rather large) block of text in the yellow section. There could be up to 200+ lines, so it may be advisable to use something like http://pastebin.com/, that will also allow you to make your paste unlisted. You can even create an account, and delete the pastebin snippet later on.

    Alternatively, you can submit the information directly via e-mail: shanebishop with a gmail dot you-know-what at the end.

    Plugin Author nosilver4u

    @nosilver4u

    One more thing with the above. If you are still having trouble, please e-mail screenshots of the media library and the bulk optimize to the address above.

    I just sent you an email with all the details. Thanks.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Getting errors while optimizing’ is closed to new replies.