[OWASP_PHPSEC] Cookie Error

rahul chaudhary rahul300chaudhary400 at gmail.com
Thu Jun 20 15:33:46 UTC 2013


While setting cookies I received the following error:

Cannot modify header information - headers already sent by (output started
at /usr/share/php/PHPUnit/Util/Printer.php:172)


After digging, I found out that there should be no output lines present
before setting any cookie. By the looks of error also, it suggests the
same, that the output has already been started.

However when I put ob_start() in the beginning of the file, then the error
goes away. But I am not sure what it does and what effect will it have on
the overall library.

Also I am having difficulties in testing this cookie function in PHPUnit.
Any comments on that ?

-- 
Regards,
Rahul Chaudhary
Ph - 412-519-9634
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/owasp_php_security_project/attachments/20130620/0e771550/attachment.html>


More information about the OWASP_PHP_Security_Project mailing list