problem in uploading images using php image upload script

December 25, 2014 1.1k 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.