Image Uploader Problems

Problem with the site? Got a suggestion? Got feedback? Post here and the staff will discuss it with you.
Post Reply
mdogg
User avatar
Donator
Posts: 954
Joined: Fri May 18, 2007 9:39 am
Location: My house

Image Uploader Problems

Post by mdogg »

I've never had problems like this before. When I upload an image, I get strange PHP errors:

Code: Select all

Warning: imagecreatefromjpeg(): 'C:\WINDOWS\TEMP\php188.tmp' is not a valid JPEG file in d:\public_html\betaarchive\imageupload\index.php on line 66

Warning: imagejpeg(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 89

Warning: imagesx(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 96

Warning: imagesy(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 96

Warning: imagesx(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 107

Warning: imagesy(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 108

Warning: imagecreatetruecolor(): Invalid image dimensions in d:\public_html\betaarchive\imageupload\index.php on line 114

Warning: imagesx(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 117

Warning: imagesy(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 117

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 117

Warning: imagejpeg(): supplied argument is not a valid Image resource in d:\public_html\betaarchive\imageupload\index.php on line 123
Is this a problem at my end or an error in the script?
Image

Andy
User avatar
Administrator
Posts: 12815
Joined: Fri Aug 18, 2006 11:47 am
Location: United Kingdom
Contact:

Post by Andy »

Several things can cause this:

1. A corrupted image. Simply open in an editor of your choice and use 'Save As' and save it again. This should eradicate any corruption.

2. The cron job ran and deleted the temp file (although I've not heard of this happening with jpegs, only gifs).

3. A PHP error occurred, although unlikely.

Unknown

Post by Unknown »

I get these errors if I leave spaces or dashes in the filename.
I found using an underscore instead fixed the problem.

Rob Jansen
User avatar
Donator
Posts: 5271
Joined: Sat May 12, 2007 1:05 pm
Location: The Collection Book
Contact:

Post by Rob Jansen »

Unknown wrote:I get these errors if I leave spaces or dashes in the filename.
I found using an underscore instead fixed the problem.
I never had problems with spaces. But this looks like an PHP error.
Because it says an error has occurd on index.php line 107 (and more)

Andy
User avatar
Administrator
Posts: 12815
Joined: Fri Aug 18, 2006 11:47 am
Location: United Kingdom
Contact:

Post by Andy »

DjRob wrote:
Unknown wrote:I get these errors if I leave spaces or dashes in the filename.
I found using an underscore instead fixed the problem.
I never had problems with spaces. But this looks like an PHP error.
Because it says an error has occurd on index.php line 107 (and more)
The PHP error occured though, because the file was not what the command was expecting, so it throws up an error saying "well I dunno what to do with this!".

I've never had these errors unless its been a bad file.

Post Reply