RE: [PHP] php error reporting problem
On 29 March 2006 15:25, ngwarai zed wrote: phpinfo says Configuration File (php.ini) Path /etc/php.ini And the file I am editing is /etc/php.ini Is this not the one Iam supposed to edit? On list please! H'mmm -- file permissions? You've stopped and restarted Apache? Which operating system? Starting to clutch at straws, now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] php error reporting problem
-Original Message- From: ngwarai zed [mailto:[EMAIL PROTECTED] Sent: 30 March 2006 13:36 I am using Fedora core 4. yes I stopped and restarted apache On 3/30/06, Ford, Mike wrote: On 29 March 2006 15:25, ngwarai zed wrote: phpinfo says Configuration File (php.ini) Path /etc/php.ini And the file I am editing is /etc/php.ini Is this not the one Iam supposed to edit? On list please! H'mmm -- file permissions? You've stopped and restarted Apache? Which operating system? Starting to clutch at straws, now! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List ( http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
Re: [PHP] php error reporting problem
I checked the apache error log and the error is written there just as I expected like below. [client 127.0.0.1] PHP Parse error: parse error, unexpected T_STRING, expecting ',' or ';' on line 90, referer: http://localhost/form.html The problem is I know what the error is. What I want is for the error to be shown when I run the script not to be just written to the error log. I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? Display_error and errror_reporting were a typo. I wrote these correctly while editing php.ini. I mean I wrote display_errors and error_reporting. Thanks in advance
RE: [PHP] php error reporting problem
-Original Message- From: ngwarai zed [mailto:[EMAIL PROTECTED] Sent: 29 March 2006 14:39 To: Christopher Murtagh The problem is I know what the error is. What I want is for the error to be shown when I run the script not to be just written to the error log. I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? You're not editing the right php.ini -- check phpinfo() for where it says it's expecting php.ini to be (right near the top), and go edit that instead. Cheers! Mike Mike Ford, Electronic Information Services Adviser, Learning Support Services, JG125, The Library, James Graham Building, Headingley Campus, Beckett Park, LEEDS, LS6 3QS, United Kingdom Tel: +44 113 283 2600 extn 4730Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error reporting problem
Thanks Christopher for your help. I followed you numbered advicestep by step. 1) I verified that there weren't any typo's that were causing fatal problems in my php.ini 2) looked at the output of phpinfo() and verified the location of the php.ini script. /etc/php.ini .This is the file I am modifying 3) checked my apache config, could not see anything that might be overriding my setup. 4) checked my script for any ini_set() function calls that might be changing display_errors. I did not use any ini_set() functions But still the problem is not solved. Just to recap on the problem: I just want the deliberate php errors Imake to shown as errors on the php page when the script runs. Thanks in advance On 3/29/06, Christopher Murtagh [EMAIL PROTECTED] wrote: On Wed, 2006-03-29 at 16:38 +0300, ngwarai zed wrote: I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? Here are the things I would try (I'm assuming Linux/Apache setup): 1) verify that there aren't any typo's that are causing fatal problems in your php.ini 2) look at the output of phpinfo() and verify the location of the php.ini script. Default locations on *nix systems can be /usr/local/lib/php.ini or /etc/php.ini depending on how PHP was built. You might be modifying the wrong file (I've done that more than once). 3) check your apache config, see if there's anything that might be overriding your setup. 4) check your script for any ini_set() function calls that might be changing display_errors. Cheers, Chris
Re: [PHP] php error reporting problem
On Wed, 2006-03-29 at 18:25 +0300, ngwarai zed wrote: But still the problem is not solved. Just to recap on the problem: I just want the deliberate php errors Imake to shown as errors on the php page when the script runs. Yes, that should be the normal behaviour. Check your error_reporting setting. It should be one of the following (see below). The most common would be: error_reporting = E_ALL If this still doesn't work, try the default php.ini.dist and copy it over your php.ini. Cheers, Chris - error_reporting values - ; reporting level ; E_ALL - All errors and warnings (doesn't include E_STRICT) ; E_ERROR - fatal run-time errors ; E_WARNING - run-time warnings (non-fatal errors) ; E_PARSE - compile-time parse errors ; E_NOTICE - run-time notices (these are warnings which often result ; from a bug in your code, but it's possible that it was ; intentional (e.g., using an uninitialized variable and ; relying on the fact it's automatically initialized to an ; empty string) ; E_STRICT - run-time notices, enable to have PHP suggest changes ; to your code which will ensure the best interoperability ; and forward compatibility of your code ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING- warnings (non-fatal errors) that occur during PHP's ; initial startup ; E_COMPILE_ERROR - fatal compile-time errors ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) ; E_USER_ERROR - user-generated error message ; E_USER_WARNING- user-generated warning message ; E_USER_NOTICE - user-generated notice message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error reporting problem
On Wed, 2006-03-29 at 16:38 +0300, ngwarai zed wrote: I tried changing display_errors = On and error_reporting = On in php.ini , restarted httpd but when I check with phpinfo() I still see display_errors set to Off and error_reporting set to 2047. My php script still does not show any errors. Why are my changes to php.ini not refrlected when I run phpinfo() ? Where am I getting it all wrong? Here are the things I would try (I'm assuming Linux/Apache setup): 1) verify that there aren't any typo's that are causing fatal problems in your php.ini 2) look at the output of phpinfo() and verify the location of the php.ini script. Default locations on *nix systems can be /usr/local/lib/php.ini or /etc/php.ini depending on how PHP was built. You might be modifying the wrong file (I've done that more than once). 3) check your apache config, see if there's anything that might be overriding your setup. 4) check your script for any ini_set() function calls that might be changing display_errors. Cheers, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php error reporting problem
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?
Re: [PHP] php error reporting problem
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? Sure you're editing the right php.ini file? No .htaccess files disabling error display? ini_set turning it off? -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php error reporting problem
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php