Announcement

#1 2013-06-29 14:51:50

kyp_
Member
2013-06-17
84

Infos about Cookies / Sessions

Hey,

just a few general questions about it:

Do you receive 2 pwg_id cookies by default, one for "www.site.com" and the other for "site.com" ?
Or is the one guest, the other the admin session ?


How long does a guest cookie last, or is supposed to last in the expiration date ?



And lastly, if you log in you get a pwg_id for "www.site.com", does this one work as well for the "site.com" Url ?


Thx for any insights about that :)
Kyp


Cheers

Offline

 

#2 2013-06-29 15:39:17

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: Infos about Cookies / Sessions

Hi kyp_,

cookie is not shared between www.site.com and site.com

By default the session lasts 30 minutes but it can be auto-renewed. The cookie has a much longer duration (I don't remember how long) but what's important is the duration of the session.

Offline

 

#3 2013-06-29 18:19:31

flop25
Piwigo Team
2006-07-06
7037

Re: Infos about Cookies / Sessions

It's always recommended to choose between www or no www, to do so you add a rewrite rule


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2013-06-29 18:40:07

kyp_
Member
2013-06-17
84

Re: Infos about Cookies / Sessions

Well since both work, www. and without it I might be confused about which one I'm using all the time ?
Additionally the cloudflare redirect comes too, to confuse things for me at least ;)

RewriteCond %{HTTP_HOST} ^site.com$
RewriteRule ^/?$ "http\:\/\/www\.site\.com\.cdn\.cloudflare\.net\/" [R=301,L]


The www.site.com/admin.php only works "with www.". If I try site.com/admin.php it adds the www. to it.

The site.com Cookies did stay since yesterday (which I've set additionally to 2015 expiration date).

The www.site.com Cookie on the other hand changed 2 times already, meaning I've received a new one either after a full site refresh or browser restart.


edit: I will try it with a fresh firefox profile now additionally,because the little gnome inside the server is starting to annoy me =).

cheers
Kyp

Last edited by kyp_ (2013-06-29 18:41:13)


Cheers

Offline

 

#5 2013-06-30 13:16:34

kyp_
Member
2013-06-17
84

Re: Infos about Cookies / Sessions

It happened with a fresh firefox profile as well:

logged in on: www.site.com
Tried to remove tag's on tag page, worked twice to remove them, 3rd time: " you are not authorized to access...."
(It seemed a session only lasts for a couple of minutes)


Logged in again 12:55h, browser had:

pwg_id
8hiq6hb1h0421vhqkjek68m5d4
site.com

pwg_id
nbimbq5vl92ud33ooc7l6is9k3
www.site.com

pwg_remember (there was only one for www.)
www.site.com

After the re-authentification the error happened again at 13:01h (local time) , 6mins later that is,
when trying to edit tag's on the tag admin page again.

8hiq6hb1h0421vhqkjek68m5d4
site.com
/
Exp:At end of session

9aqou7ubd4jp7bun6evkougpg6
www.site.com
/
Exp:At end of session

pwg_remember
1-1372590018-q1RLi%2FyMfKWor1PbE4aQM%2F9DtuM%3D
www.site.com
/
Exp:Thu, 29. August 2013 13:00:18 (local time)

SQL db says:

8hiq6hb1h0421vhqkjek68m5d4 not found
site.com


ADF59aqou7ubd4jp7bun6evkougpg6
exp:2013-06-30 04:01:05 (server time -9hours)

So re-authentification happened at 12:55h, and the cookies expiration date was set to 6mins later O_o.
So it seems the "site.com" cookie is constantly renewing itself. Any ideas/suggestions ?


cheers
Kyp


Cheers

Offline

 

#6 2013-06-30 13:21:28

flop25
Piwigo Team
2006-07-06
7037

Re: Infos about Cookies / Sessions

I don't get why you're using a rewrite rule for using cloudlflare: I just use the dns. So I just rewrite planete-flop.fr into www.planete-flop.fr
also what's you hoster? and hosting environment


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#7 2013-06-30 13:36:03

kyp_
Member
2013-06-17
84

Re: Infos about Cookies / Sessions

rewrite rule for using cloudlflare:

That one was set up by my hosting support when they activated cloudlfare for my site.


hosted at arvixe.com

Piwigo 2.5.1
Operating system: Linux
PHP: 5.2.17 (Show info) [2013-06-30 04:35:13]
MySQL: 5.5.30-30.1 [2013-06-30 04:35:13]
Graphics Library: ImageMagick 6.8.3-6

cheers
kyp

Last edited by kyp_ (2013-06-30 13:52:06)


Cheers

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact