Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading

Status
Not open for further replies.

manicleek

Technical User
Jun 16, 2004
143
GB
I have a scrip for uploading images that works fine locally, but seems to be having problems on my hosts server.

I get the error:

Code:
Warning: move_uploaded_file(/home/.sites/74/site318/web/uploaded_images/travel/20040311_fde51765.jpg): failed to open stream: Permission denied in /home/.sites/74/site318/web/edit/travel/imageuploaded.php on line 219

Warning: move_uploaded_file(): Unable to move '/home/tmp/phpNQWn3h' to '/home/.sites/74/site318/web/uploaded_images/travel/20040311_fde51765.jpg' in /home/.sites/74/site318/web/edit/travel/imageuploaded.php on line 219

It appears to be uploading fine to the PHP temp file but then having a problem moving it to the uploaded images file in my site.

 
just go to the directory travel and give permisions.
chmod 777.

It will work.
Or just change the owner of the directory to the owner apache or httpd according to the configuration of your server and give 775 permisions to be more secure.

I believe this will fix the problem.
 
Can I change those on someone elses server though, and if so how?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top