Cant log in - need help fast :)

  • Hi,

    When i go to my website i got following message please help:


    Class ‘Cookie’ not found
    at line 180 in file config/

    1.     $domains = null;
    2.     if ($context->shop->domain != $context->shop->domain_ssl) {
    3.         $domains = [$context->shop->domain_ssl, $context->shop->domain];
    4.     }
    5.     $cookie = new Cookie('ps-s'.$context->shop->id, '', $cookie_lifetime, $domains, false, $force_ssl);
    6. }
    7. }
    8. $context->cookie = $cookie;
    require - [line 32 - index.php]
    27.  *  @copyright 2007-2016 PrestaShop SA
    28.  *  @license  Open Software License (OSL 3.0)
    29.  *  PrestaShop is an internationally registered trademark & property of PrestaShop SA
    30.  */
    32. require(dirname(__FILE__).'/config/');
    33. Dispatcher::getInstance()->dispatch();

    Thank you.

  • What was the last thing you did? Did you install some module, made some changes using ftp?

  • the last thing i did was i deleted the file cookie.php and then downloaded a frech one via ftp

  • and i did that, because when i turned on the cache from BO, i couldn’t log in, and i read somewhere that a clean fresh cookie.php could solve it but. unfortunately it made it wore.

  • @datakick thank you for your help, now atleast my website is online but now i cant log in to my backoffice, it says:

    Warning: mcrypt_decrypt() [function.mcrypt-decrypt]: Received initialization vector of size 7, but size 16 is required for this encryption mode in /var/www/ on line 102

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/ in /var/www/ on line 239

    Can anybody help me. Thank you 🙂

  • Problem solved - Again thanks to @datakick 🙂

  • @datakick did you just change the cookie encryption method to fix the last error?

  • @lesley yes. There was invalid Rijndael key/vector in config file which caused the error. I simply switched ciphering method directly in database:

    update <DB_PREFIX>_configuration set value=0 where name = ‘PS_CIPHER_ALGORITHM’

  • I have come across that before also. What would you think about us detecting that warning and changing it automatically?

  • @lesley sure, fallback to another (well configured) encryption mechanism would solve this problem. There should also be some warning in back office to inform administrator that config is not in valid state.


Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.