?
Solved

can't create thumbnails through php

Posted on 2009-04-08
4
Medium Priority
?
339 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 14

Accepted Solution

by:
shobinsun earned 2000 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 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