PDA

View Full Version : Question on cookie_prefix


A84
08-01-2017, 12:17 PM
Hello!

i need to force a logout to all logged in users. Currently running 5.3.2p1

I googled a bit and it looks like changing the cookie_prefix should do the trick.

However, i notice that the /config.php file says:


// This Setting allows you to change the cookie prefix

// This must match the core/includes/config.php file cookie prefix setting

$config['cookie_prefix'] = '';


however, i currently have in my /core/includes/config.php


// Prefix that all vBulletin cookies will have
// Keep this short and only use numbers and letters, i.e. 1-9 and a-Z
$config['Misc']['cookieprefix'] = 'bb';



what should i do then? shall i change them both to bb1 , or should i leave the first one blank and change the second one to bb1 ?

thank you :)

Rafa-el
08-01-2017, 02:18 PM
Hello!

i need to force a logout to all logged in users. Currently running 5.3.2p1

I googled a bit and it looks like changing the cookie_prefix should do the trick.

However, i notice that the /config.php file says:



however, i currently have in my /core/includes/config.php




what should i do then? shall i change them both to bb1 , or should i leave the first one blank and change the second one to bb1 ?

thank you :)

You can change it to whatever you want, altough you could just drop the sessions table and that'll also do the trick.

A84
08-03-2017, 07:14 AM
Thank Rafa-el, my question was not if i had to change to something, but if i had to change just one, or both.

For those who might find this thread, the answer is:

- you must change them both. the /config.php file has "" assigned to cookie prefix, but apparently it is overridden as a default value somewhere. If you change it in /core/includes/config.php you have to change it in /config.php too (as stated in the config.php comment)

- in my case however, truncating the sessions table only did not work at all. In the end just to be sure, i truncated the table and changed both files. Hope this helps somebody in the future :)

TheLastSuperman
08-04-2017, 12:41 AM
Thank Rafa-el, my question was not if i had to change to something, but if i had to change just one, or both.

For those who might find this thread, the answer is:

- you must change them both. the /config.php file has "" assigned to cookie prefix, but apparently it is overridden as a default value somewhere. If you change it in /core/includes/config.php you have to change it in /config.php too (as stated in the config.php comment)

- in my case however, truncating the sessions table only did not work at all. In the end just to be sure, i truncated the table and changed both files. Hope this helps somebody in the future :)

Truncating the session table does work though, their session will end and they will need to login again before being able to post. What you should do in the future is close the site temporarily, truncate the session table then change cookie prefix and such, then truncate session table again and finally re-open the site which is the only way to ensure everyone is loading the new cookie per say.