Title: Warning: [function.getimagesize]:
Last modified: August 20, 2016

---

# Warning: [function.getimagesize]:

 *  [earnandsave](https://wordpress.org/support/users/earnandsave/)
 * (@earnandsave)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/warning-functiongetimagesize/)
 * I recently upgraded to WP 3.2.1 and PHP5. When I started the upgrade process,
   it said I should backup the WP database; to do that I had to change the database
   password (this is a client’s site I am editing/updating). Then the whole site
   was down, I corrected that by speaking to support at the hosting company, they
   told me to put the new db password in the wp-config.php file. The site came back,
   yet on a few pages there are lots of warnings like this:
 * Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /
   nfs/c06/h02/mnt/88665/domains/mataline.com/html/wp-content/themes/mataline/page.
   php on line 53
 * the other variation is the same but with ‘single.php on line 39’.
    I looked up
   this error and found several approaches, here is what I have done so far: changed
   permissions on .htaccess file to 744 created a php.ini file and added ‘allow_url_fopen
   = 1;’ many of the images on the site are hosted externally, so I tried to copy
   an image to the server and I got this error:
 * “bandaline1.jpg” has failed to upload due to an error
    Unable to create directory/
   nfs/c02/h07/mnt/39655/domains/mataline.com/html/wp-content/uploads/2011/08. Is
   its parent directory writable by the server?
 * I created the /uploads/2011/08 directory, and changed permissions for the whole/
   uploads tree to 777, yet still the same result.
 * Any ideas on how to solve this would be greatly appreciated.
 * This is the content of line 53 of page.php, and line 39 of single.php:
    $arrImageSize
   = getimagesize(get_post_meta($post->ID, ‘post_image’, true));

Viewing 1 replies (of 1 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 9 months ago](https://wordpress.org/support/topic/warning-functiongetimagesize/#post-2273065)
 * You should never have had to change the password to make a backup, but yes, changing
   the password would break the site. And the hosting company was correct, putting
   the password in the wp-config.php will bring it back.
 * But what you did NOT tell us was this:
 * 1) Did you finish the upgrade?
    2) What version of PHP did you upgrade to? 3)
   Have you tried MANUALLY upgrading the files?

Viewing 1 replies (of 1 total)

The topic ‘Warning: [function.getimagesize]:’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [getimagesize](https://wordpress.org/support/topic-tag/getimagesize/)
 * [permissions](https://wordpress.org/support/topic-tag/permissions/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/warning-functiongetimagesize/#post-2273065)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
