Closed osbre closed 5 years ago
Can it be related to https://github.com/spiral/roadrunner/issues/18 ?
@wolfy-j maybe yes
@wolfy-j @Ostap34JS I think it caused by #93
@Alex-Bond wow, Thank you for fix!
Then i`m wait to pull request will be merged
Merged and released.
Coool, ok - i`m go to try new changes
i'm go to my roadrunner cloned directory, run git pull
, and sudo make
and run my laravel project - sessions also not work.
The fix is actually in composer dependency not rr binary.
i'm updated my composer dependencies (composer update
) , and run project again (rr serve -v -d
)
sorry, too don't work - it return 419
@Ostap34JS can you check if CSRF code sending to the server when you submitting the form?
ok, checking... thank you
if you want see config: https://github.com/Ostap34JS/roadrunner-laravel-test
oh yes, csrf token exists, but it always change if page refreshed
the problem is that the csrf token is not saving and always updated
@Ostap34JS i love Laravel. Not it doesn't see cookies... in some cases.
it's bad (
@Ostap34JS actually now its working, but i didnt change anything.
You mean in your computer it works?
@Ostap34JS yeap. Sorry for russian :)
Проверил в инкогнито и обычном режиме - вс еок. Дает зарегаться и залогинится. Но столкнулся с странным поведением когда я делаю логаут, но он не логаутит. Это я уже хз что за фигня. Возможно где-то не донастроил сесии в ларе.
А при логауте как он удаляет куки?
@Alex-Bond :)
у меня кстати тоже такое было, но потом вообще перестало логинить
@wolfy-j @Ostap34JS при логауте согласно коду он просто обнуляет сессию (атрибуты в []). Но вместе с этим он создает новую сессию и отправляет новую куку с сессией. А дальше начинается веселая часть - при ребуте он то считает что я залогинен, то нет. Такое чувство что прописывает что то в $_SESSION и $_COOKIE, но при дебаге все чисто. Не пойму откуда эта скотина берет не те данные.
Меня еще сильно ссмущает то что он шлет set-cookie 2 раза подряд.
Если он прописывает что-то в $_SESSION и $_COOKIE то однозначно утекают данные в следующий запрос... Трудно сказать, мы не пользуемся Ларавел (
А ядро Ларавела перезагружается между запросами?
@wolfy-j дак и так делается терминейт между запросами как в симфе. Он вроде не пишет, но есть чутье что что-то в глобалку он всетаки умудряется писать.
@wolfy-j да
А если maxJobs = 1 то работает стабильно?
@wolfy-j сделал numWorkers: 1 и все стало стабильно. 100% глобалка гдето. Осталось понять где!
Нащупал что то интерестное. \Illuminate\Auth\SessionGuard не обнуляется при выставлении нового запроса. Теперь надо придумать как его поправить.
@wolfy-j @Ostap34JS So, a small update in English because i feel like i figure out a problem. Looks like Laravel doesn't reset few components with terminate() call and we have to reset it manually. In order to do that, i have to create a wrapper around an application like https://github.com/php-pm/php-pm-httpkernel have. Its already 4AM (4:00) at my place, so i will look into this before the end of the week.
Thank you for digging in, this explains a lot.
Sorry for offtopic, but similar issue. With Symfony 4.2 I had to send session cookie headers to the $response object and regenerate/update session variables manually within the RR bootstrap. Is it correct? Current RR bootstrap example in the docs don't have workarounds for session support.
I think, for complete Laravel/Lumen integration with best performance, it will be great to implement same service providers and DI instances resets logic as here https://github.com/swooletw/laravel-swoole/blob/master/config/swoole_http.php#L92-L120
Please refer to https://github.com/spiral/roadrunner/issues/96
@barbushin this story has been addressed by #96. Can you please put your ideas/links regarding performance optimizations into separate story so we can avoid loosing it?
Thank you :)
Steps to reproduce
composer create-project --prefer-dist laravel/laravel laravel57
cd laravel57
php artisan make:auth
php artisan migrate
rr -v -d
Environment
How to fix it? thanks