this is a problem with the memory_limit setting on the PHP server.
Resizing the image on upload can be very memory intensive. even if the image is below the max file size setting, the memory required by the GD library may excede the memory_limit setting.
To increase the memory limit setting, add the following at line 1:
<?php ini_set('memory_limit', '256M'); ?>

