have you hardcoded the paths somewhere? usually laravel should just use correct values..
file_put_contents(C:\xampp\htdocs\xxx\storage\framework/sessions/KXcxw0bXfbUEyvf2fCN12hiHt9VFeWTFFEzS42rk): failed to open stream: No such file or directory
I upload my laravel to shared hosting but it's path for storage is C:\xampp... (local)
How can I change it? or do I have a choise to not using session option?
@shez1983 not really, now I am trying to re upload all files and folders to shared hosting, let's see If it will be fixed
You should re-create the cache for composer/autoload/paths. The paths get cached so if you upload everything it will use your local path, not the server's.
@bashy sorry I am new to laravel and it was working fine yesterday, can you give me an example?
@alihuseyin in my case i use, -composer install -composer update -php artisan optimize
-
composer dump-autoload -
composer install -
php artisan cache:clear -
php artisan clear-compiled
Can't really say without knowing where it stored that path.
sometimes if this condition is not working. just check is sessions directory availablele inside the storage/framework/sessions
I deleted the file /public_html/bootstrap/cache/config.php
then I ran php artisan config:cache
This worked for me
@steveleblanc how i do it in hosting
@steveleblanc ti's worked❤ thx💛
You can as well rename your config.php to config.php.old and refresh your application or else open your application incognito (ctrl + Shift + N ). This worked for me
This worked perfectly for me.Thanks
php artisan config:clear
php artisan cache:clear
worked for me
@JemCdo This worked for me
Ok i don't have any terminal or git in server ,can i make this modifications in my local then try to upload it if it's yes plz how can i do it.
@steveleblanc you're a lifesaver. I was scratching my head over this for 30 minutes.
WOOOOW MY MAGICIAN
This is just want you need to do:
Navigate to your projects /bootstrap/cache/ folder.
then delete the contents of the directory and everything will work
@Isavic it worked for me in shared hosting (where I don't have terminal access)
thanks, worked for me
Add the following code in your routes/web.php
Route::get('/clear', function() {
Artisan::call('cache:clear');
Artisan::call('config:cache');
Artisan::call('view:clear');
return "Cleared!";
});
Then go to your site/clear
Hope, It may help.
@abdullahalharun haha this saved me thanks alot
@abdullahalharun Thanks so much bro, you saved someone
I Get same issue and found automatic created folder in my public_html the folder name is like D:\xampp\htdocs\c....\ it cant be deleted and modified and for this folder I get an error this one "file_put_contents(D:\xampp\htdocs\csidBackUp\storage\framework/sessions/ixHLlCSBvfeUi7b9op4AWQrlf1SG82xzOBCMmLq3): Failed to open stream: No such file or directory " now what do I do? any suggestion
@Nihir Como mencionaron arriba, tienes que ejecutar los siguientes comandos:
php artisan view:clear cache:clear config:clear
o ejecutar todas con: php artisan optimize
It worked for me when i changed all paths in C:\xampp\htdocs...\bootstrap\cache\config.php
Just now I just discovered a step that works out.
Try this: Open your web files, then public_html/storage/framework/.... (in this directory create a new folder as "sessions" then refresh your website. It should load fine
If not laravel for others check the core folder then storage/framework/.... (in this directory create a new folder as "sessions" then refresh your website.
In my case, I did the following:
create these folders under storage/framework: sessions, views, cache then works fine.
After changing my config.php to config_old.php, I am seeing another error:
Class "App\Models\portfolio" not found (View: /home4/jambgigs/myunique.ozmadugu.com/resources/views/frontend/home_all/portfolio_page_all.blade.php)
Well done, you win today's archaeologist prize for digging up the oldest question.
Now start your own question because this is not even closely related
This is just want you need to do:
Navigate to your projects /bootstrap/cache/ folder.
then delete the contents of the directory and everything will work
this is also works for me
Please or to participate in this conversation.