the files must not have spaces after the last closing bracket. you must not turn off the parser to send plain html or text over the line. a) setcookie requires this b) we buffer html anyways into the pagebuffer first (both names buf_put() and put_buf())