Not able to display warnings
Posted by: DaK (---.021-480-6c6b701.cust.bredbandsbolaget.se)
Date: April 02, 2010 05:22PM

I canĀ“t get all warnings to display at my WAMP test server: The following code shall result in a few more warnings than I got from WAMP:
<?php
error_reporting( E_ALL | E_STRICT | E_WARNING);
echo "D";
session_start();
$_SESSION["s"] = y;
setcookie();
setcookie(1);
?>
Expected result is (on live server):
D
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at XXX:3) in XXX on line 4

Notice: Use of undefined constant y - assumed 'y' in XXX on line 5

Warning: setcookie() expects at least 1 parameter, 0 given in XXX on line 6

Warning: Cannot modify header information - headers already sent by (output started at XXX:3) in XXX on line 7


Though on WAMP my output is:
D
Notice: Use of undefined constant y - assumed 'y' in YYY on line 5

Warning: setcookie() expects at least 1 parameter, 0 given in YYY on line 6


How can I fix so WAMP displays EVERY warning and not just SOME warnings.

Options: ReplyQuote
Re: Not able to display warnings
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: April 02, 2010 07:46PM

Just set error reporting to E_ALL

Options: ReplyQuote


Sorry, only registered users may post in this forum.