Vikash PR
Vikash PR

Reputation: 66

Laravel: while hosting xampp on localhost in mac getting an error UnexpectedValueException

I am just starting with laravel, when I localhost it in xampp(localhost:8080/app/public) in mac [where app is a file created when I created] it shows an error

`UnexpectedValueException
The stream or file "/opt/lampp/htdocs/app/storage/logs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied`

Please help me with this.

Upvotes: 1

Views: 853

Answers (1)

Joseph
Joseph

Reputation: 6259

It looks that laravel doesn't have permissions to create logs so come to the root directory of the project and run this command from your terminal

sudo chmod -R 775 .

in your case, your project is in this path /opt/lampp/htdocs/app so move to it first then change permissions like this

$ cd /opt/lampp/htdocs/app
$ sudo chmod -R 775 . 

Upvotes: 2

Related Questions