The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Width/Height of an Uploaded Image?

Hi all,

On a site I am developing, there is an area for users to upload an image of themselves. The actual upload code works, but the code I have in place is not grabbing the width/height of the image (to make sure it doesn't exceed the maximum dimensions). The form code is as follows:

I added the is_uploaded_file line and it does recognise it as an uploaded file (plus this is used later on to upload the image so it must be correct). Before the getimagesize line, I added: error_reporting(E_ALL) which returned the following error:

Warning: getimagesize(): Unable to access C:\WINDOWS\TEMP\phpBDB6.tmp in E:\USERS\path\to\file on line 187 Warning: getimagesize(C:\WINDOWS\TEMP\phpBDB6.tmp): failed to open stream: No such file or directory