Nginx waits until the request ends for the receipt of cookies, How to get the cookie when it is generated through php without waiting for the end of the request?
Asked
Active
Viewed 54 times
1 Answers
0
If you're using nginx version 1.5.6+, you can use set fastcgi_buffering
directive to 'off', or do something like
<?php
header('X-Accel-Buffering: no');
to achieve the same effect. Please note that PHP won't flush the headers (which contains the cookies) unless there's some output to send in the body (using echo
or print
). See this answer for more info on headers.

Community
- 1
- 1

Ahmad Sherif
- 5,923
- 3
- 21
- 27