skip to Main Content

I have my laravel 8 app hosted in hostinger hpanel but for hours I have trying to fix this error.

UnexpectedValueException There is no existing directory at "There is no existing directory at "/Users/macbookpro/Documents/Theodory/projectName/storage/logs" and it could not be created: Permission denied" and it could not be created: Permission denied missing folder is from my machine instead of cpanel path.

I have tried find and delete ../bootstrap/cache/config.php but there is no such a file and I have tried to delete all storage/logs but am still getting that error and I have tried to add manually in web.php

Route::get('/optimize',function(){
 Artisan::class('optimize:clear');

});

But when I hit /optimize am still getting the same error.

I have decided to use hostinger ssh so that I can be able to run artisan commands but am still getting same error even after hitting artisan commands successful.

What can I make it work in hostinger hpanel to which is similar to traditional cpanel.

3

Answers


  1. try the following commands and hit again /optimize

    php artisan route:clear
    
    php artisan config:clear
    
    php artisan cache:clear
    
    Login or Signup to reply.
  2. try these artisan commands

    php artisan optimize:clear
    

    after that, you should run this command

    php artisan optimize
    
    Login or Signup to reply.
  3. you are facing this issue because your application doesn’t have proper permissions for the storage directory.

    Use this command to grant required permissions to the storage directory, and this should resolve the issue.

    chmod 777 -R storage/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search