When I try to upload an image to my website I get this error message. If anybody can help please put replies in easy to follow, step by step 1,2,3 answers as I am Computer illiterate and don't want to damage any other part of the script. Thanks in advance!!

Warning: move_uploaded_file(adverts/286ec6c9631b8d962ffaaadebd05bac3jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/artscraf/public_html/upload.php on line 29

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpVp1Wy6' to 'adverts/286ec6c9631b8d962ffaaadebd05bac3jpg' in /home/artscraf/public_html/upload.php on line 29

Recommended Answers

All 3 Replies

Looks like you might have the CHMOD the adverts file to allow write permissions from a local script.

Thanks for your help. You are the first person who has come up with that suggestion - from 3 forums. I have changed the CHMOD code on the adverts file from 755 to 777 and it all appears to upload properly now. Is this code okay or should I use a different one?
If it goes wrong again I'll definitely be back to this forum first.

yup 777 should be fine if your just keeping pictures in that folder.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.