Re: php error reporting problem
| From: | Paul Novitski | Date: | Tue, 28 Mar 2006 19:10:08 +0000 |
| Subject: | Re: php error reporting problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232751@lists.php.net to get a copy of this message | ||
At 10:57 AM 3/28/2006, ngwarai zed wrote:
hi, I omitted a semicolon ; at the end of a php statement on purpose to see what the error looks like. I ran the script and a blank page just came out.No error message. I then edited php.ini and set Display_errors = On and errror_reporting = E_ALL then restarted httpd. Ran the script again and the same thing happens. My question is:- how do I make php to show me a simple error like omitting a semicolon?If you omit the semicolon at the end of a line, PHP attempts to join it with the next line into one statement. Sometimes, by coincidence, this results in a legal statement. To show the error message, enter two statements that you're sure will combine into invalid syntax, such as:
$x = 4
$y = 3;
Their concatenation results in:
$x = 4 $y = 3;which should get you "parse error, unexpected T_VARIABLE." Paul