Page 1 of 1

file uploads making a copy

Posted: Fri Mar 31, 2006 10:36 am
by flann
I'm trying to upload a file, and then make a copy of it as a thumbnail. I'm having a real hard time getting it to work and also understanding the upload process. Can somebody please help. I've read the article on php.net about imagecopyresized and I still can't get it to work.

I am able to upload and move one file though.

Posted: Fri Mar 31, 2006 10:49 am
by feyd
Look for onion2k's tutorial in the Tutorial section here.

Posted: Fri Mar 31, 2006 10:52 am
by flann
do you have a link?

Posted: Fri Mar 31, 2006 10:55 am
by feyd

Posted: Fri Mar 31, 2006 11:14 am
by flann
Thanks for that, I've went through the tutorial step-by-step, and now I'm getting an error.

Code: Select all

Warning: imagegif(): Unable to open '..uploads/products/productA.gif' for writing in manage/productInsert.php on line 23
I have checked my directory settings, and I currently have them them set to 777 where they need to be. I've also checked the spelling of the directories and they match up, what else could be causing this error?

edit:

I just read an article stating that imagegif() was taken out of some versions of the GD Library, how do I find out what version I'm running, like phpinfo();

Posted: Fri Mar 31, 2006 11:28 am
by feyd
flann wrote:Thanks for that, I've went through the tutorial step-by-step, and now I'm getting an error.

Code: Select all

Warning: imagegif(): Unable to open '..uploads/products/productA.gif' for writing in manage/productInsert.php on line 23
I have checked my directory settings, and I currently have them them set to 777 where they need to be. I've also checked the spelling of the directories and they match up, what else could be causing this error?
../uploads maybe.
flann wrote:I just read an article stating that imagegif() was taken out of some versions of the GD Library, how do I find out what version I'm running, like phpinfo();
phpinfo() will tell you if GIF support is enable and what it supports.

Posted: Fri Mar 31, 2006 11:56 am
by flann
../uploads is correct because I need to go up one directory and then into the products directory. I also tried with jpeg and switched everthing to work for it, and got the same error. I'll keep working on it, thanks.

Posted: Fri Mar 31, 2006 12:05 pm
by feyd
The error you posted is missing the slash between .. and uploads. That's what I was subtly point at.

Posted: Fri Mar 31, 2006 1:18 pm
by flann
that was it :). I can't believe I missed that, thank you