cancel
Showing results for 
Search instead for 
Did you mean: 

Warning: Expiry date cannot have a year greater than 9999 in PhpCookieManager.php on line 148

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Warning: Expiry date cannot have a year greater than 9999 in PhpCookieManager.php on line 148

Hello,

 

 

I am on Magento 2.2.6 CE and have recently used the php bin/magento setup:upgrade command and php bin/magento setup:static-content:deploy en_US en_GB -f however now when trying to access the frontend I am presented with the following error:

There has been an error processing your request

Exception printing is disabled by default for security reasons.

Error log record number: 1270760383118

 

Upon looking at the system.log file, it shows the following error:

[2018-10-23 17:21:25] main.ERROR: Warning: Expiry date cannot have a year greater than 9999 in /home/passionh/public_html/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php on line 148 [] []

However, I do not know what this means or how to fix it. I haven't made any changes to the site for the error to occur so it is completely random and beyond my scope of knowledge.

 

I can still access the backend of the site without any issues. Sorry if I have not posted in the correct format, however I am hoping someone can help based on the information provided.

 

Thank you!

 

 

2 REPLIES 2

Re: Warning: Expiry date cannot have a year greater than 9999 in PhpCookieManager.php on line 148

Hi @Bergerman

 

ok i understand the problem you are facing !

 

Well here i would suggest you to update the value of cookie and session lifetime.

 

You can do it by below ways : 

 

1)  You can set the value in the admin by going to:

Configuration > General > Web > Default Cookie Settings> Cookie Lifetime  - Add 3600 as an value in this column -> click on save -> clear the cache

 

2) You can set the value in the admin by going to:

Configuration > Advanced > Admin > Security > Session Lifetime (Seconds). - Add 900 as an value in this column - click on save -> clear the cache

 

Then check it will works for you !

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Warning: Expiry date cannot have a year greater than 9999 in PhpCookieManager.php on line 148

Hello,

 

Thank you for your quick reply! I found that solution elsewhere and tried it, unfortunately it hasn't worked.

 

This is line 148 of the PhpCookieManager.php file:

            $this->extractValue(CookieMetadata::KEY_HTTP_ONLY, $metadataArray, false)

However it means nothing to me, so not sure it would be of much use to you!