PHP setcookie for 1 Year will not work
Do like this...
setcookie("myCookie",'exampleUserName',time()+31556926 ,'/');// where 31556926 is total seconds for a year.
try this one
setcookie($cookie_name, $cookie_value, time() + ( 365 * 24 * 60 * 60));
setcookie($cookie_name, $cookie_value, strtotime("+1 year"));