How to get images to display on website while using XAMPP on Macbook Pro

14,579

Solution 1

@john steve I had also the same issue. I tried lots of thing suggested on different forums but it did not work. Finally I set up permission for each images and it worked.

Solution 2

I just had the same problem. And the reason was that my images folder had no-access permission. I changed the permission to Read/Write for admin and Read-only for everyone else. It is possible to change permission for each individual time but it is time consuming, therefore changing the permission of parent folder is effective.

The following steps are for MAC OS:

  • Open applications folder
  • Locate XAMPP folder
  • Right click > get info.
  • In pop-up window locate the 'sharing & permission' section
  • Click the 'locked' padlock symbol
  • Enter admin password
  • Change 'Everyone' permissions to read & write
  • In the get info window still, select the 'cog' icon' drop down option at the very bottom and select 'Apply to enclosed items' this will adjust the permission across all sub-folders as well.
  • Re-lock the padlock symbol
  • Close the 'Get Info' window.

And for Windows: -

  • Locate XAMPP folder
  • Right-click the folder, click Properties, and then click the Security tab.
  • Click Edit to open the Permissions for <Object> dialog box.
  • Click the name of the group or user.
  • In the Permissions for <User or Group> box, select the Allow check box.

References: Microsoft and Stackoverflow

Share:
14,579
John Steve
Author by

John Steve

Updated on June 24, 2022

Comments

  • John Steve
    John Steve almost 2 years

    I built an HTML/CSS website and then added PHP functionality. Installed XAMPP. Since installing XAMPP, everything on the site works except the images. Image files don't display. They are all properly referencing the directory. In fact, before using XAMPP, the images displayed fine on the HTML webpages. After using XAMPP and re-saving as .php, they stopped working. Nothing else changed. I figure it must be a settings issue. Thoughts, anybody?

    Thanks a billion in advance!