This question already has an answer here:
I am getting these errors when trying to upload an image to the server
Warning: getimagesize(../images/image-1Product 320120312100APPLE_IMG_0072.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/content/44/8713044/html/admin/Home.php on line 107
Warning: imagecreatefromjpeg(../images/image-1Product 320120312100APPLE_IMG_0072.jpg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/content/44/8713044/html/admin/Home.php on line 122
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/content/44/8713044/html/admin/Home.php on line 128
I know why I am getting the third error because of the 1st and 2nd error, I dont why I am getting warnings for 1 and 2, the folder does exist.
Line 107 -
$size = getimagesize($source);
Line 122 -
$image = imagecreatefromjpeg($source);
Line 128 -
imagecopyresampled($new_image,$image,0,0,$x,$y,$thumb_width,$thumb_width,$width,$height);
If anyone has got any tips It would be much appreciated.
I changed it over to the full path, but got this error URL file-access is disabled in the server configuration
Do you have GD installed an enabled?
http://www.php.net/manual/en/image.installation.php
your $source variable is point to wrong path ..
if you include a php file in other folder that contains this code , try to use local path like this :
don't use '../' if your images folder is in root that first file is there .
Try and remove the space from your file name. I had a problem like this once, and I believe removing the space fixed it.
Change:
To:
This problem is usually solved by reconfiguring the php.ini
To do that, you might need to contact your hosting provider.
If you're using Wordpress or any other CMS, it might accure due to a security plugin that's installed. Most security plugins change the .htaccess in order to prevent unauthorized access to url's, directories and files.
check your .htaccess and search for
if you find it, remove it (#RewriteRule ^.* - [F,L]) and check if it fixed your problem.