Title: PHP Warning:  getimagesize(1)
Last modified: August 24, 2016

---

# PHP Warning: getimagesize(1)

 *  Resolved [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/php-warning-getimagesize1/)
 * I’m getting a lot of PHP warnings:
 * `[31-Mar-2015 20:31:24 UTC] PHP Warning: getimagesize(1) [<a href='function.getimagesize'
   >function.getimagesize</a>]: failed to open stream: No such file or directory
   in /webstuff/blogs/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/
   modules/nextgen_data/package.module.nextgen_data.php on line 656`
 * which is the backup_image function:
 *     ```
       if ($image_path = $this->object->get_image_abspath($image)) {
                   $retval = copy($image_path, $this->object->get_backup_abspath($image));
                   // Store the dimensions of the image
                   if (function_exists('getimagesize')) {
                       $mapper = C_Image_Mapper::get_instance();
                       if (!is_object($image)) {
                           $image = $mapper->find($image);
                       }
                       if ($image) {
                           $dimensions = getimagesize($retval);
                           $image->meta_data['backup'] = array('filename' => basename($retval), 'width' => $dimensions[0], 'height' => $dimensions[1], 'generated' => microtime());
                           $mapper->save($image);
                       }
                   }
               }
       ```
   
 * The problem is that you are calling getimagesize($retval) but $retval is returned
   from the copy function and is thus a boolean and NOT a filename.
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

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

 *  Thread Starter [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/php-warning-getimagesize1/#post-5966017)
 * Do you want to me raise this as a bug? If so how do I do that?
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/php-warning-getimagesize1/#post-5966018)
 * [@steve](https://wordpress.org/support/users/steve/) – We should have a correction
   for this issue committed to our next release branch of NextGEN Gallery but you
   are still welcome to submit this as a “bug” via our Bug Report form here: [http://nextgen-gallery.com/report-bug/](http://nextgen-gallery.com/report-bug/)
 * – Cais.
 *  [Benjamin](https://wordpress.org/support/users/benjaminowens/)
 * (@benjaminowens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/php-warning-getimagesize1/#post-5966022)
 * You are correct and we have checked in an update that fixes this, to be released
   in our next update. Thanks for reporting!
 *  [Giusva](https://wordpress.org/support/users/giusva/)
 * (@giusva)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-getimagesize1/#post-5966080)
 * hello everybody. i have same problem with wordpress 4.2.2. Some solution? please!
   Thanks
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years ago](https://wordpress.org/support/topic/php-warning-getimagesize1/#post-5966081)
 * [@giusva](https://wordpress.org/support/users/giusva/) – Please start your own
   topic so we can try to help you with your specific issue on your specific site.
 * See [http://codex.wordpress.org/Forum_Welcome#Where_To_Post](http://codex.wordpress.org/Forum_Welcome#Where_To_Post)
 * Thanks!
 * – Cais.

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

The topic ‘PHP Warning: getimagesize(1)’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/php-warning-getimagesize1/#post-5966081)
 * Status: resolved