Jump to content

[SOLVED] How to generate Cookie Key?


Recommended Posts

Hi!

I've been so stupid I deleted my settings.ini.php file by misstake.

I've tried to setup a new one but I don't know how to generate a cookie key.


This is my settings.ini.php:

<?php

define(’PS_BASE_URI‘, ‘/’);
define(’THEME_NAME‘, ‘Silver’);
define(’DB_NAME‘, ‘dbname’);
define(’DB_SERVER‘, ‘dbserver’);
define(’DB_USER‘, ‘dbuser’);
define(’DB_PREFIX‘, ‘ps_’);
define(’DB_PASSWD‘, ‘dbpassword’);
define(’DB_TYPE‘, ‘MySQL’);
define(’COOKIE_KEY‘, ‘???????’);
define(’COOKIE_IV‘, ‘cookie_iv’);
define(’PS_VERSION‘, ’1.3.2.3’);

?>



I really need some fast help.

The website is: www.attribute.se (for now it's blank).


Thanks in advance!

Link to comment
Share on other sites

It's the following code on lines 48-49 of install/xml/createDB.php that creates the cookie key and IV:

array('_COOKIE_KEY_', Tools::passwdGen(56)),
array('_COOKIE_IV_', Tools::passwdGen(8)),



It just generates a random 56-letter key for the cookie key and a 8-letter IV both made up of uppercase and lowercase letters and numbers. You could easily create them yourself, but note that changing these values will cause all your existing passwords to stop working, so you will need to recreate your password using the new cookie key. See here for how to do that.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 10 months later...

Just for my knowledge,

 

does that apply to rijndael key too and also customers will loose all password if such keys are lost?

 

Last doubt, if somone get the keys can get to my passwords?

If so I should copy them in a safe place.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...