Is there a reason you're making two copies of the image? That script doesn't seem to crop the image any, so why not use "<img src="" height=100 width=120>"? I'd add a few print "Part 1 done", "Part 2 done", print tags to make sure it's running through that subfunction properly. Other than that I'm clueless. Does your new server gd installed on it?