Support » Plugin: WP-Optimize - Clean, Compress, Cache. » PHP error with v2.3.0

  • Resolved arrowd


    Since updating to v2.3.0, I’m getting PHP errors like this:
    [13-Apr-2019 00:19:29 UTC] PHP Warning: filesize(): stat failed for
    1/mych7701.jpg in
    imize/includes/class-updraft-smush-manager.php on line 542

Viewing 9 replies - 1 through 9 (of 9 total)
  • Same happens to me.

    Hope to get this solved really quickly.

    Thanks in advance

    Plugin Contributor LumberHack


    Thanks for reporting this @magaworks and @arrowd . I am working on a fix ASAP, please can you let me know if you are using a CDN to deliver these images ? Are the images referenced in the PHP notices physically present on the server ?


    I am not using any CDN. All images are coming from my hosting service.

    Plugin Author David Anderson


    Specifically, does this file exist on the server?


    No but /home/arrowsmi/public_html/vs/html/wordpress/wp-content/uploads/2012/01/mych770.jpg does.

    Maybe this can help.
    This is my error log:

    17-Apr-2019 14:02:14 UTC] PHP Warning:  filesize(): stat failed for /.../wp-content/uploads/2018/10/recrutamento-1-800x800.jpg in /.../wp-content/plugins/wp-optimize/includes/class-updraft-smush-manager.php on line 542
    [17-Apr-2019 14:02:14 UTC] PHP Stack trace:
    [17-Apr-2019 14:02:14 UTC] PHP   1. {main}() /.../wp-admin/admin-ajax.php:0
    [17-Apr-2019 14:02:14 UTC] PHP   2. do_action() /.../wp-admin/admin-ajax.php:167
    [17-Apr-2019 14:02:14 UTC] PHP   3. WP_Hook->do_action() /.../wp-includes/plugin.php:465
    [17-Apr-2019 14:02:14 UTC] PHP   4. WP_Hook->apply_filters() /.../wp-includes/class-wp-hook.php:310
    [17-Apr-2019 14:02:14 UTC] PHP   5. Updraft_Smush_Manager->updraft_smush_ajax() /.../wp-includes/class-wp-hook.php:286
    [17-Apr-2019 14:02:14 UTC] PHP   6. Updraft_Smush_Manager_Commands->get_ui_update() /.../wp-content/plugins/wp-optimize/includes/class-updraft-smush-manager.php:98
    [17-Apr-2019 14:02:14 UTC] PHP   7. Updraft_Smush_Manager->get_uncompressed_images() /.../wp-content/plugins/wp-optimize/includes/class-updraft-smush-manager-commands.php:144
    [17-Apr-2019 14:02:14 UTC] PHP   8. filesize() /.../wp-content/plugins/wp-optimize/includes/class-updraft-smush-manager.php:542

    I went to check the uploads folder and did not find the image “/uploads/2018/10/recrutamento-1-800×800.jpg”
    But there are a lot of images like “recrutamento-1-800×800-150×150.jpg”. (from diferent sizes wordpress generates)

    In wordpress > Media Library I had the image “recrutamento-1-800×800.jpg”, but when I enter to edit the image, it does not show the image itself.
    In the Media list there is a thumbnail showing; but there is no image in the edit screen for this media.
    Since I was no longer in need of this image, I deleted it from the media Library, and the error seemed to have disappeared.

    But the strange thing is that this “Ghost image” got lost somehow, but it’s resized images remain there.

    Plugin Author David Anderson


    I’m not sure if the log message really should be suppressed here. Your media library contains a record of a non-existent image. The log message has revealed that. That seems to be what logging is for – to detect previously-unknown problems.

    Error logging records programming errors. Most programmers would check for a file’s existence before trying to find it’s size. If the file doesn’t exist, then show an error message or ignore it but don’t make a PHP error.

    Plugin Contributor LumberHack


    Hi @arrowd , thanks we are working on improving the logging with a better error message if the file cannot be found. It should be live in the next upcoming release. Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP error with v2.3.0’ is closed to new replies.