[OWASP_PHPSEC] Cookie Error

Abbas Naderi abiusx at owasp.org
Sat Jun 22 18:59:49 UTC 2013


Hi
PHPUnit uses output buffering (ob) itself, so you have some sort of flushing somewhere that its dumping the data. Check its settings and all.
-Abbas
On Khordad 30, 1392, at 8:03 PM, rahul chaudhary <rahul300chaudhary400 at gmail.com> wrote:

> 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
> _______________________________________________
> OWASP_PHP_Security_Project mailing list
> OWASP_PHP_Security_Project at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp_php_security_project



More information about the OWASP_PHP_Security_Project mailing list