Laravel file_put_contents error on shared hosting



 laravel deploy to cpanel show this error

file_put_contents(C:\xampp2\htdocs\mpks\mpks-mycomm.jpmv1.1\mpksv1.1\storage\framework/sessions/5VfNF1jT1SaxVps80ZBxBuTS8OpUALY4ydXvElJh): Failed to open stream: No such file or directory



Solution :  https://stackoverflow.com/a/57549189

I had the same issue here. I tried to run php artisan config:cache but it didn't work out

Then I delete all my sessions in /myprojectname/storage/framework/ but still didn't work out on shared hosting but worked fine on localhost.

Here's what worked:

I delete the cache folder in /myprojectname/bootstrap/ and ran the application and got this error:

Exception thrown with message "The /hosthome/hostuser/myprojectname/bootstrap/cache directory must be present and writable."

I then made a new cache folder in /myprojectname/bootstrap/ and ran the site and it was up

in short terms

  • Navigate to your projects /bootstrap/cache/ folder.

  • Delete the contents of the directory and your good to go 

Ulasan

Catatan popular daripada blog ini

SISTEM PENGOPERASIAN KOMPUTER (OS)

JENIS-JENIS SISTEM PENGOPERASIAN KOMPUTER

APA ITU ASCII (AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE) ?