Occasionally WordPress experiences problems when uploading images or upgrading plugins. After some Googling I found the solution on this site.
You need to add these lines to your .htaccess file. If you don’t have the file just create one.
Options All -Indexes AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php
This will make sure that all php files are treated as php 5.