Title: [Plugin: Regenerate Thumbnails] Processing script dies on server side error (Version 2.1.1)
Last modified: August 19, 2016

---

# [Plugin: Regenerate Thumbnails] Processing script dies on server side error (Version 2.1.1)

 *  [pete-sch](https://wordpress.org/support/users/pete-sch/)
 * (@pete-sch)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-regenerate-thumbnails-processing-script-dies-on-server-side-error-version-211/)
 * The script dies in the ajax error handler.
    There is no variable named “response”
   in the error handler.
 *     ```
       error: function() {
         RegenThumbsUpdateStatus( id, false, response );
       ```
   
 * > response is not defined
   >  RegenThumbsUpdateStatus( id, false, response );
 * In my case, the disk was full.
 *     ```
       <br />
       <b>Warning</b>:  imagegif() [<a href='function.imagegif'>function.imagegif</a>]: Unable to open '/home/wp/public_html/wp-content/uploads/2010/10/bang-580x220.gif' for writing: Disk quota exceeded in <b>/home/wp/public_html/wp-includes/media.php</b> on line <b>445</b><br />
       {"success":"&quot;Bang&quot; (ID 30685) was successfully resized in 0.367 seconds."}
       ```
   
 * Tip 1: You should check all the image manipulation functions return values to
   be sure that all images are successfully processed.
    Tip 2: You should suppress
   warnings to avoid non-JSON output.
 * Thanks,
 * [http://wordpress.org/extend/plugins/regenerate-thumbnails/](http://wordpress.org/extend/plugins/regenerate-thumbnails/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [pete-sch](https://wordpress.org/support/users/pete-sch/)
 * (@pete-sch)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-regenerate-thumbnails-processing-script-dies-on-server-side-error-version-211/#post-1789268)
 * As I can see, you use the “wp_generate_attachment_metadata” function.
 * I tweaked my server to get a disk quote error again. There are the contents of
   the variable **$metadata** after running
    **$metadata = wp_generate_attachment_metadata(
   $image->ID, $fullsizepath );** in **ajax_process_image()**.
 * Resize failed:
 *     ```
       Array
       (
           [width] => 600
           [height] => 398
           [hwstring_small] => height='84' width='128'
           [file] => 2010/03/portrait.gif
           [image_meta] => Array
               (
                   [aperture] => 0
                   [credit] =>
                   [camera] =>
                   [caption] =>
                   [created_timestamp] => 0
                   [copyright] =>
                   [focal_length] => 0
                   [iso] => 0
                   [shutter_speed] => 0
                   [title] =>
               )
   
       )
       ```
   
 * Resize succeeded:
 *     ```
       Array
       (
           [width] => 600
           [height] => 398
           [hwstring_small] => height='84' width='128'
           [file] => 2010/03/portrait.gif
           [sizes] => Array
               (
                   [thumbnail] => Array
                       (
                           [file] => portrait-150x150.gif
                           [width] => 150
                           [height] => 150
                       )
   
                   [medium] => Array
                       (
                           [file] => portrait-300x199.gif
                           [width] => 300
                           [height] => 199
                       )
   
                   [post-thumbnail] => Array
                       (
                           [file] => portrait-267x180.gif
                           [width] => 267
                           [height] => 180
                       )
   
                   [S] => Array
                       (
                           [file] => portrait-60x60.gif
                           [width] => 60
                           [height] => 60
                       )
   
                   [M] => Array
                       (
                           [file] => portrait-180x180.gif
                           [width] => 180
                           [height] => 180
                       )
   
                   [F] => Array
                       (
                           [file] => portrait-580x220.gif
                           [width] => 580
                           [height] => 220
                       )
   
               )
   
           [image_meta] => Array
               (
                   [aperture] => 0
                   [credit] =>
                   [camera] =>
                   [caption] =>
                   [created_timestamp] => 0
                   [copyright] =>
                   [focal_length] => 0
                   [iso] => 0
                   [shutter_speed] => 0
                   [title] =>
               )
   
       )
       ```
   
 *  Plugin Contributor [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-regenerate-thumbnails-processing-script-dies-on-server-side-error-version-211/#post-1789428)
 * Thanks. That’s certainly helpful. I’ll tweak my AJAX handler a bit. 🙂
 *  Plugin Contributor [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-regenerate-thumbnails-processing-script-dies-on-server-side-error-version-211/#post-1789440)
 * Odd, if that warning is failed, an array shouldn’t be returned:
 *     ```
       if ( IMAGETYPE_GIF == $orig_type ) {
       	if ( !imagegif( $newimage, $destfilename ) )
       		return new WP_Error('resize_path_invalid', __( 'Resize path invalid' ));
       ```
   
 * Although my plugin has a bug where it won’t realize an error has occurred there(
   fixing that now).
 *  Plugin Contributor [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-regenerate-thumbnails-processing-script-dies-on-server-side-error-version-211/#post-1789443)
 * Try 2.1.2 and see how it works. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Regenerate Thumbnails] Processing script dies on server side
error (Version 2.1.1)’ is closed to new replies.

 * ![](https://ps.w.org/regenerate-thumbnails/assets/icon-128x128.png?rev=1753390)
 * [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/regenerate-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/regenerate-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/regenerate-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/regenerate-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/regenerate-thumbnails/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-regenerate-thumbnails-processing-script-dies-on-server-side-error-version-211/#post-1789443)
 * Status: not resolved