WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] Getting errors while optimizing (17 posts)

  1. webguru4u
    Member
    Posted 1 year ago #

    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/

  2. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  4. webguru4u
    Member
    Posted 1 year ago #

    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-

    http://i.imgur.com/R6kj8sF.jpg

    Thanks again!

  5. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  6. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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/

  7. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. webguru4u
    Member
    Posted 1 year ago #

    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.

  10. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  11. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  12. webguru4u
    Member
    Posted 1 year ago #

    Its still the same errors, no change.

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

  13. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  14. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  15. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  16. webguru4u
    Member
    Posted 1 year ago #

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

  17. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    For posterity:

    After more troubleshooting, it seems to have been a 2-part issue. The plugin was bailing out if images weren't located within the wordpress folder, but it is possible on older blogs to have uploads that had absolute paths stored on an old part of the filesystem where WP used to be installed. To fix that, the plugin was modified to do a simple check that the file actually exists. Problem #1 solved.

    The second issue appeared to be that the web user did not have proper permissions on the old images, preventing them from being optimized. Unless webguru4u says otherwise, I believe changing permissions fixed the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags