Updates after research: (Found in the PHP Forums for setcookie()):
======================================================================================
setcookie + header Location + IIS 5 = Trouble
It took me a long time to figure out what was causing a missing cookie in one system while it worked perfectly in another...
See this one: http://support.microsoft.com/kb/q176113/
In short, this WILL NEVER WORK IN IIS 5:
<?php
header("Pragma: no-cache");
header('Location: http://www.example.com/');
setcookie('AA','1',0,'/');
setcookie('BB','2',time() + 24 * 3600,'/');
?>
You will ONLY get the Location Header, everything else will be "cut out" by IIS 5 CGI implementation.
Solutions:
1- Migrate to Apache/IIS6/Whatever
2- Use a Non Parsed Header Script (nph-*.php)
3- Try with header('Refresh: 0; $URL');
======================================================================================
This is in fact what zenphoto is doing: `setcookie` followed by `header("Location: ...");` redirect.
In fact, the redirect is usually not used, and you can delete that line safely to set your cookie better, with the possible downside of having to navigate a little more.
It's line 31 in `auth_zp.php`:
`header("Location: " . FULLWEBPATH . $redirect);`
Just comment it out (put `//` before it) or delete it and it should work.
I will work on a long-term solution for this in the next version if that works. Let me know! Thanks!
Edit: Also if you want (and know how) try replacing that line with:
`header('Refresh: 0; ' . FULLWEBPATH . $redirect);`
And tell me what happens. Thanks again!