Solved

can't create thumbnails through php

Posted on 2009-04-08
4
326 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
Comment Utility
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
Comment Utility
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)
Comment Utility
Check if the image 2.jpg exists in the referred folder. Try with some existing image in that folder.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
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…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

763 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

8 Experts available now in Live!

Get 1:1 Help Now