Answers for "file_put_contents(): failed to open stream: Permission denied"

0

[ErrorException] file_put_contents(./composer.json): failed to open stream: Permission denie d

sudo chown -R $USER ~/.composer/
Posted by: Guest on April-29-2020
1

Warning: file_put_contents(phplog): failed to open stream: Permission denied in /Applications/XAMPP/xamppfiles/

maybe you can change your Xampp Apache settings.

File location : Applications/XAMPP/xamppfiles/etc/httpd.conf

Set section with your user and group to allow PHP to write :

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User deamon
Group deamon
</IfModule>
change

User deamon
to

User [your user name]
and

Group deamon
to

Group #-1
Posted by: Guest on February-09-2021

Code answers related to "file_put_contents(): failed to open stream: Permission denied"

Browse Popular Code Answers by Language