php - Laravel storage/framework/sessions on EC2 gives failed to open stream -


i use have working deployment system amazon beanstalk ec2 servers , added optimization post commmands scripts such

composer dump-autoload sudo php artisan optimize --force sudo php artisan route:cache 

now on 1 of api endpoints it's strange half of data @ end have error

file_put_contents(/var/app/ondeck/storage/framework/sessions/34325rfeq4324qfgr4): failed open stream: no such file or directory 

what's causing , how fix in ec2 deployment setup?

edit

i found out something! if on server thats giving me error run command below clear config cache error dissapears. how fix can still run php artisan config:cache , not have break?

php artisan config:clear 

the reason why you're having issue because you're running artisan config:cache before "release" - on /var/app/ondeck

if run eb ssh, you'll see app living inside /var/www

you need run config:cache using post deploy hook - seems isn't officially supported yet. here's workaround: http://junkheap.net/blog/2013/05/20/elastic-beanstalk-post-deployment-scripts/


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -