Solved

can't create thumbnails through php

Posted on 2009-04-08
4
327 Views
Last Modified: 2012-05-06
so basically i upload an image and it dynamically creates a thumbnail through php on one of my sites--it worked on one of my sites fine but i try it on another site and i get this

Warning: getimagesize(html/images/uploadTest/thumbs/2.jpg) [function.getimagesize]: failed to open stream: No such file or directory in html/admin/Thumbnail.class.php on line 174

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in html/admin/Thumbnail.class.php on line 351

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in html/admin/Thumbnail.class.php on line 359

Warning: imageinterlace(): supplied argument is not a valid Image resource in /html/admin/Thumbnail.class.php on line 327

Warning: imagejpeg(): supplied argument is not a valid Image resource in html/admin/Thumbnail.class.php on line 328

Warning: copy(tm_2.jpg) [function.copy]: failed to open stream: No such file or directory in html/admin/uploader.php on line 26

i think i changed something in the php.ini file but i'm not sure...any ideas?
Warning: getimagesize(html/images/uploadTest/thumbs/2.jpg) [function.getimagesize]: failed to open stream: No such file or directory in html/admin/Thumbnail.class.php on line 174
 

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in html/admin/Thumbnail.class.php on line 351
 

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in html/admin/Thumbnail.class.php on line 359
 

Warning: imageinterlace(): supplied argument is not a valid Image resource in /html/admin/Thumbnail.class.php on line 327
 

Warning: imagejpeg(): supplied argument is not a valid Image resource in html/admin/Thumbnail.class.php on line 328
 

Warning: copy(tm_2.jpg) [function.copy]: failed to open stream: No such file or directory in html/admin/uploader.php on line 26

Open in new window

0
Comment
Question by:Abyssmal
4 Comments
 
LVL 14

Accepted Solution

by:
shobinsun earned 500 total points
ID: 24104142
Hello,

the warning "Warning: copy(tm_2.jpg) [function.copy]: failed to open stream: No such file or directory in html/admin/uploader.php on line 26"  means that there is no such file or the file has some permission problem. Give the full permission to the file.



To avoid these warnings, change the  'error_reporting ' variable to  error_reporting = E_ALL & ~E_NOTICE  in your php.ini file.
0
 

Author Comment

by:Abyssmal
ID: 24104388
hmm i think that makes sense, so add permissions to the folder to be able to write within the folder
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 24104836
Check if the image 2.jpg exists in the referred folder. Try with some existing image in that folder.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now