PHP setcookie for 1 Year will not work

Viewed 39557

I'm trying to set a PHP cookie to expire 1 Year from when the user logged in, and I'm doing it this way:

setcookie("myCookie",'exampleUserName',(365 * 24 * 60) ,'/');

The problem is, when I view the cookie using the console in Chrome or Firefox, it show Expires Sun, 05, 2014 in Chrome and Expires = Session in Firefox.

Any other site like Google or stackoverflows cookies show the correct expiration date.

How can I set this right?

5 Answers
Related