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

Vikash Rajendran

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.

Joseph

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 . 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

UnexpectedValueException laravel :protocol error

XAMPP localhost error not found

404 error for socket.io on localhost - XAMPP - Laravel 5.5

Getting 400 error in Laravel for localhost server

Laravel setup on Mac in XAMPP

Laravel 8 Migrate Error Using XAMPP Database on MAC

Getting error "Whitelabel Error Page" while running localhost:8080

Php curl script working on localhost (xampp) but not when I upload it to hosting

Getting error while trying to send email in localhost php

Laravel server hosting error

Getting error while migrating laravel 7 to 8

Getting error while connecting sybase laravel

Getting error while trying to load laravel project

Laravel 404 error with xampp

Class not loading on Hosting but works on localhost - Laravel 5

Getting Error <location allowOverride="false"> while hosting WEB API 2 in Hostgator

Composer error [UnexpectedValueException]

Composer error on update [UnexpectedValueException]

Getting libcrypto ar error while compiling OpenSSL for Mac

getting "version not supported" error while compiling shaders on Mac in OpenGL

how to run laravel and reactjs app on localhost(xampp)

Laravel(xampp) Got error while trying to migrate real website to virtual host : SQLSTATE[42S02]

Test php mail function in localhost on Mac using XAMPP

Getting error while run migrate command in laravel 8

Getting error while clicking on edit function button in laravel

Getting error while trying to return stored value with notification in Laravel

getting error while inserting data to mysql database in laravel 5

Getting timezone not found error while performing group by month in Laravel Carbon

In laravel i'm getting the following error while add data to db