Jump to content


Photo

Image upload copy() problems


  • Please log in to reply
1 reply to this topic

#1 JoeF

JoeF
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationScotland

Posted 01 July 2006 - 12:09 AM

Hey, ive used this piece of code before and it worked perfectly fine, but now that ive moved this site to a different folder im getting permission errors.

Its an image upload, it uploads ok, but im getting a permission error when i try and copy it from the tmp file and rename it to it new location. This worked before but now its not:

Heres the code:
copy($_FILES['imagefile']['tmp_name'], "../img/thumbs/".$filen.".jpg") or die ("could not copy"); 
the "../img/thumbs/".$filen.".jpg" part is my auto name gen bit, it works fine.

And i get this error:

Warning: copy(../img/thumbs/oo34m2CSfU.jpg): failed to open stream: Permission denied in /home/slammer/public_html/oob/jellybeans/process.php on line 30
could not copy


ive tried changing the permissions of the folders, but that doesnt help..

Hope someone can help.

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 01 July 2006 - 02:36 AM

Set the permission on the folder.

777

or windows read and write in permissions tab.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users