file uploads making a copy

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
flann
Forum Commoner
Posts: 38
Joined: Tue Aug 23, 2005 10:48 pm

file uploads making a copy

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Look for onion2k's tutorial in the Tutorial section here.
flann
Forum Commoner
Posts: 38
Joined: Tue Aug 23, 2005 10:48 pm

Post by flann »

do you have a link?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

flann
Forum Commoner
Posts: 38
Joined: Tue Aug 23, 2005 10:48 pm

Post 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();
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
flann
Forum Commoner
Posts: 38
Joined: Tue Aug 23, 2005 10:48 pm

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The error you posted is missing the slash between .. and uploads. That's what I was subtly point at.
flann
Forum Commoner
Posts: 38
Joined: Tue Aug 23, 2005 10:48 pm

Post by flann »

that was it :). I can't believe I missed that, thank you
Post Reply