Did you find any problems regarding the getimagesize PHP server after you upgrade to PHP5?
following I will give way to overcome this problem, namely by using curl module and a simple bit of coding you can implement in your PHP code writing
The first step you need to do is create a function get_content useful to read the contents of the file to be processed using the module curl
The next step is to open the image file with get_content function
Then create an image with ImageCreateFromString, then use a function ImageSX to get the width of the image and function ImageSY to get the image height.