Unable to save image in folder

Alles, was PHP betrifft, kann hier besprochen werden.

Unable to save image in folder

Postby sachinskn » 17. September 2022 13:09

I am unable to save images in folder but the image url is saving in database table .. please help me I am using xampp 7.4.29-1 version on MacOs M1 Chip
sachinskn
 
Posts: 1
Joined: 17. September 2022 12:58
XAMPP version: 7.4.29-1
Operating System: MacOs M1 Chip

Re: Unable to save image in folder

Postby Nobbie » 17. October 2022 15:49

Probably wrong permissions in the target folder. MacOS has a sophisticated rights managent for Users, Groups, Rest of World, who may or may not store files in certain folders. The User which runs Apache process must have sufficient rights to store files in the folder.

You need to know which User is running Apache (see httpd.conf "User=...."), which permissions are required and which permissions are given. MacOS is not Windows, which is far easier to handle. In Windows mostly every User may do everything. Thats different on MacOS.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: Unable to save image in folder

Postby gulshan212 » 14. November 2023 10:52

Well, you need to check file and folder permission, and you can also check for duplicate file names. I will also recommend you to check for disk space.
Thanks
User avatar
gulshan212
 
Posts: 21
Joined: 12. January 2023 12:14
Location: Haldwani, Uttarakhand
XAMPP version: 8.0.25
Operating System: Windows 10

Re: Unable to save image in folder

Postby MilesWeb » 01. March 2024 10:13

You can try out some of these troubleshooting options,
1. verify necessary permissions, if not done select the padlock icon, enter your credentials, and grant the required permission
2. you can create separate subfolders within the main destination folder
3. make sure that you have the correct file path for saving the image
User avatar
MilesWeb
 
Posts: 10
Joined: 19. January 2024 10:40
XAMPP version: 8.0.30
Operating System: linux


Return to PHP

Who is online

Users browsing this forum: No registered users and 42 guests