Just started with Cloudflare. It got active this morning and the problems started directly. My php session is destroyed after 1 minute. This causes users to be logged out. What settings or cookie set code in php must I use to make sure the session stays alive on cloudflare?
It ia deleted. Monitored it in network tab. But this is not the case before cloudflare. But you suggest to ask there because even though it happends only when cloudflare is active, it is no cloudflare problem?
Thanks so far. I will try stackoverflow to see if anyone knows what causes this issue. It is just the default session start php sends that is removed after one minute and with it all active sessions. I cant find documentation what to do diferent when i use cloudflare, so if it is my code. I have no idea where to begin searching.
I’d also point out #tutorials and the search on the forum will also provide a lot of threads on most topics. Particularly rewriting/restoring IP addresses has been extensively covered. Along with our all-time favourite SSL of course
Well, when using Cloudflare, we need to inject our IPs. That way, we can terminate SSL/TLS connections and apply all the features and protections that you want. Due to this setup, your visitors will connect to our servers, and our servers will then further connect to yours. That’s why your servers will only be able to see our IPs, and a potential attacker won’t be able to see yours.
Now, since you still want or need to get the visitors original IP, and not our IPs, we have a HTTP header in place that’s called CF-Connecting-IP which sends you the real IP of the visitor. You’d need to use this instead of whatever you use to detect the IP addresses at the moment.
Thanks for responding. Made changes in php to fetch as described. I now changed back the nameservers and reactivated clouflare. But it looks like the site is not connecting trough cloudflare. Does it take a long time to connect or do i need to restart something?