Why is it not showing error?

For some reason, wamp would not show an error like: Warning: Cannot modify header information - headers already sent by …

<?php
echo “hello”;
header(“whatever.php”);
?>

I have checked the setting in php.ini
display_errors = On

what went wrong?

try also:


error_reporting(E_ALL);

or the same setting in php.ini

Or output_buffering is set to On (in php.ini, .htaccess or using ini_set()) or ob_start() was called somewhere before the code you’re showing.
If that is the case header() won’t raise a warning because no output has actually been sent yet: it’s still in an output buffer.

Thanks, that fixed a problem.

Why Wamp set output_buffering ON as a default? Hmm