IMAGE UPLOAD HELP - I already read the Tutorinal
Moderator: General Moderators
IMAGE UPLOAD HELP - I already read the Tutorinal
Hi,
I'm working on a website where I need to upload digital camera pictures. I've been trying to follow the Tutorial for uploading and creating a thumbnail.
When I upload a test image of something small (7.14 KB), it works no problem.
When I uplaod a real image (2,116KB), I keep getting the following errors:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Warning: unlink(): No such file or directory in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 105
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 107
Warning: imagesx(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 117
Warning: imagesy(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 117
Warning: imagesx(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 131
Warning: imagesy(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 132
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 134
Warning: imagesx(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 135
Warning: imagesy(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 135
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 135
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 136
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
From what I can tell, they seem to deal with the $_FILES['image']['tmp_name'] variable.
So I ran a print out of if and $_FILES['image']['tmp_name'] is empty / blank.
Like I said, when I use the smaller image, it prints out the name of the tmp file no problem. Any ideas how to get this working?
Thanks!
I'm working on a website where I need to upload digital camera pictures. I've been trying to follow the Tutorial for uploading and creating a thumbnail.
When I upload a test image of something small (7.14 KB), it works no problem.
When I uplaod a real image (2,116KB), I keep getting the following errors:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Warning: unlink(): No such file or directory in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 105
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 107
Warning: imagesx(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 117
Warning: imagesy(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 117
Warning: imagesx(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 131
Warning: imagesy(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 132
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 134
Warning: imagesx(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 135
Warning: imagesy(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 135
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 135
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/.ginko/jaccrock/jcstrategies.com/jeff/admin/featured_listings.php on line 136
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
From what I can tell, they seem to deal with the $_FILES['image']['tmp_name'] variable.
So I ran a print out of if and $_FILES['image']['tmp_name'] is empty / blank.
Like I said, when I use the smaller image, it prints out the name of the tmp file no problem. Any ideas how to get this working?
Thanks!
Actually, you can do this via an .htaccess file, I've run into this before.PrObLeM wrote:no, if you dont have access to the webserver then you're pretty much screwed. you could try and zip the image and send it like hopefully it will be under 2 mb
Obviously your host has to allow the use of an .htaccess file...
PHP Manual: php.ini directives
PHP Manual: upload_max_filesize
PHP Manual: How to change configuration settings
The javascript question was relating to resizeing the image small enough so that it will upload before sending it to the server... I've never done it, i don't even konw if it's possible? Just trying to throw out ideas
bdlang,
You said you ran into this before? How did you fix it? What can i do to the .htaccess file?
Thanks!
bdlang,
You said you ran into this before? How did you fix it? What can i do to the .htaccess file?
Thanks!
- Read the links I reference in my original post.
- In your web root directory, create a file named .htaccess (note the '.')
- The file should contain these lines:
(or whatever max file size you want)
Code: Select all
php_value upload_max_filesize 20971520 php_value post_max_size 22020096 - Save the file
- Don't forget to change the value of MAX_FILE_SIZE in your form.
- Check your file upload script