Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

file_put_contents failed to open stream: No such file or directory , Install

Tags:

php

laravel

i cloned a laravel project from bitbuket . also run all necessary command to get all vendors files like :

composer dump-autoload
composer install
php artisan cache:clear
php artisan clear-compiled

also deleted the file /public_html/bootstrap/cache/config.php

but i am getting the below error when i try to launch the project :

file_put_contents(C:\xampp\htdocs\laravelstart\storage\framework/sessions/sRPb1A6BKrshhH8HPAR2fXVEcCH4daYCLxgo4b8M): failed to open stream: No such file or directory

like image 546
roche Avatar asked Oct 16 '25 04:10

roche


2 Answers

rm -rf bootstrap/cache/config.php (delete)

php artisan config:cache

like image 50
Ali Özyıldırım Avatar answered Oct 18 '25 16:10

Ali Özyıldırım


There can be various reasons why that error happened.

  1. Try to delete all cached files.
    rm -rf bootstrap/cache/config.php
    php artisan config:clear
    php artisan cache:clear
    php artisan config:cache

  2. If the above actions does not work, then try this again.
    Give permission to the directories in storage directory: app, framework, logs

    sudo chmod -R 777 storage/app
    sudo chmod -R 777 storage/framework
    sudo chmod -R 777 storage/logs

like image 21
handsomedev19 Avatar answered Oct 18 '25 18:10

handsomedev19



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!