Note: This issue is already solved, finally I found that it\'s not cookies problem, the problem is on unserialize() function. The serialized cookie which
Probably your server time is not correct therefore Cookeis are not working on server.
Try this:
setcookie("settings", serialize($defaultSettings), 0);
Setting expiration to zero will fix your issue in this case. or update your server time.