You shouldn't use URL's. It tries to connect from your server to your ferver which is the long way around. Your server gives you the 500 error and without the values getimagesize() sets you get the "division by zero" errors.
The false that is returned from imagecreatefrom***() gives all the other errors.
I'm not sure if this was any help, but I hope it didn't make you stupider.
Experience is something you get just after you really need it.
PHP Installation Guide