PHP Cookies don’t work on Apple/Mac – Safari and Opera Browsers/iPhone, iPad, iPod Devices – FIXED

If you’re having problems with using PHP $_COOKIES with Safari, Opera, iPad, iPod, iPhone, ibla bla or any Apple product. Please put the gun down. Queue the Hallelujah Chorus…

[wpaudio url=”http://www.hallelujah-chorus.com/audio/10277-m-001.mp3″ text=”I just fixed something” dl=”0″]

Below will not work on all browsers


setcookie('nertusername', $nertusername, time()+60*60*24*365, 'www.test.com');
setcookie('nertpassword', md5($nertpassword), time()+60*60*24*365, 'www.test.com');

This will work on all browsers.


setcookie('nertusername', $nertusername, time()+60*60*24*365, '/');
setcookie('nertpassword', md5($nertpassword), time()+60*60*24*365, '/');

Tagged , , , , , , ,

Leave a Reply