Sorry, I was looking at this post:
CHMOD to 777 to be able to allow uploads
Basically with safe mode directories will not be created
Are you creating sub dirs via PHP in the /data and /upload directories? It appears as if that's what happening.
Also I think I see why your app has trouble where my other photo manipulation apps dont. Here is the error I see....
Unable to move file
It appears that PHP is trying to move an image file it created
from the /tmp/* directory by traversing across ACCOUNTS & SITES (which Safemode doesn't allow) to /var/www/html/sites/.....etc ????
Is this correct?