problem in uploading images using php image upload script

December 25, 2014 3.3k views

I am unable to upload images using php image upload script. The upload image is not moving to the folder but this scrip is working in other web hosting.

1 Answer

Are you getting any errors? It sounds like Apache doesn’t have permission to create files in your upload directory. Try granting the www-data user (which Apache runs as) write privileges to your upload directory:

sudo chgrp www-data /var/www/path/to/uploads
sudo chmod g+w /var/www/path/to/uploads
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!