0

I am using xampp and uploading images to my directory(lampp/htdocs) as well as in the database. images are showing in the folder but appears in the browser while fetching the image from database(server)? a lock showing in images.

1
  • Please run ls -l /path/to/images so we see who owns them, perhaps root? Nov 30, 2017 at 5:22

1 Answer 1

0

The image permissions are not in order meaning you don't have permission to view them or you don't belong to the group that does. Do ls -l /path/to/image(s) to see the ownership and permission. Then change either ownership and or permissions of the same or add yourself to that group to have the required permissions.

Do the following:

  1. Add yourself to the xamppusers group:

    usermod -a -G xamppusers $USER
    
  2. Set the correct permissions on the /opt/lampp/htdocs folder

    sudo chmod -R 775 /opt/lampp/htdocs
    
  3. Restart you system and add imags again to see if it works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .