Re: PHP setcookie() does not set cookie !
Are you sure that the setcookie() call is not preceded by any whitespace or a Unidode BOM (byte order mark -- a non-printable character that will occupy the first character position of a Unicode text file unless you deliberately create the file without the BOM)? Remember, setcookie() affects the header, so it can't happen after the headers have been sent.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)