cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

My cookie file are getting "reseted"

From: Alexander Soteras <soteras.alex_at_gmail.com>
Date: Tue, 8 Sep 2015 18:53:29 +0200

Hello,

I have a specific set up in PHP where I have wrapped a legacy PHP
application with Symfony, and all access to this legacy application go
through cURL. *(I have posted my code on a stackoverflow topic to avoid
doing a copy/paste of the code here,
http://stackoverflow.com/questions/32456400/curl-reset-my-cookies-file
<http://stackoverflow.com/questions/32456400/curl-reset-my-cookies-file>)*.

I have configured the whole thing to keep session alive with a single
cookie file per user to store session data. Everything's working fine, the
cookies file are getting updated with every session data, but my users are
getting randomly disconnected from their sessions, and they have to log in
in the application again.

When it does that, I have noticed that the cookie file is "reset", all the
data is removed and I got a new phpssid.

What would cause the cookie file to behave like that ? The whole
application is "redirected" using cURL, that mean every script, images and
such, could that cause the issue ? Could a request with an empty header
could force cURL to "clear" the cookie file, as the cookie is being written
at every request ?

From my understanding, the command CURLOPT_COOKIEJAR specify the file where
the cookie data is stored :

- If this file doesn't exist, it create it.
- On every cURL request, it write data inside it, but it never remove any
data.

I'm getting desperate here, thanks !

Alexander

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2015-09-08