Re: [PHP] Error Reporting help
Thanks to all who responded, my ISP must have restarted my web server late night, as this morning I'm now getting those old familiar error messages. - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: Chris Edwards [EMAIL PROTECTED] Cc: Sent: Monday, January 19, 2004 2:53 PM Subject: Re: [PHP] Error Reporting help Chris Edwards wrote: but do I need to do something to get PHP to actually work off of these setting once they have been changed, Restart your web server. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Thanks for all you replies, most of what you have suggested, I had already tried, in vain, before joining the list. I retried most of the combinations and still cannot get it to report syntax errors. If I have errors, from say undefined variables, the error handler catches those just fine. Question: when I use the ini_set, does that stay set for the lifetime of the script executing or is it set for good? The reason I ask, is I wonder if the permissions on the 'Ini file is blocking me from modifying it. All help is much appreciated. Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Monday 19 January 2004 07:30, Chris Edwards wrote: It's almost like it parses it before it tries to execute any lines and if a syntax error occurs, it doesn't execute any of the script. That's right. The prior version would run up until the syntax error and then give you the line if error, which usually meant the syntax error was on the previous line. I don't think any version of PHP has ever done that. More likely your prior version of PHP had display_errors enabled. In general you can enable and display all errors using: error_reporting (E_ALL); ini_set('display_errors', 1); But if display_errors (in php.ini) is disabled then syntax errors will not be displayed -- they can only be viewed in the error log. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Most people will listen to your unreasonable demands, if you'll consider their unacceptable offer. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
On Monday 19 January 2004 22:34, Chris Edwards wrote: I retried most of the combinations and still cannot get it to report syntax errors. If I have errors, from say undefined variables, the error handler catches those just fine. Again: But if display_errors (in php.ini) is disabled then syntax errors will not be displayed -- they can only be viewed in the error log. IOW have a look at the output of phpinfo(), if display_errors is off, then no matter what combinations you try you will NOT be able to see syntax errors! Question: when I use the ini_set, does that stay set for the lifetime of the script executing or is it set for good? Only during the execution of the script. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Wouldn't this be a great world if being insecure and desperate were a turn-on? -- Broadcast News */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Here's a snippet from my PHI_INI ; - Show all errors ; error_reporting = E_ALL ;error_reporting = E_ALL ~E_NOTICE ~E_WARNING ~E_CORE_WARNING ~E_USER_WARNING ~E_USER_NOTICE ~E_COMPILE_WARNING display_errors = On The commented out error_reporting was the original setting and display_errors was Off I changed them to the values you see above. When I execute my script and use init_get() the values appear to be right, but do I need to do something to get PHP to actually work off of these setting once they have been changed, i.e. some kind of refresh Thanks Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Monday 19 January 2004 22:34, Chris Edwards wrote: I retried most of the combinations and still cannot get it to report syntax errors. If I have errors, from say undefined variables, the error handler catches those just fine. Again: But if display_errors (in php.ini) is disabled then syntax errors will not be displayed -- they can only be viewed in the error log. IOW have a look at the output of phpinfo(), if display_errors is off, then no matter what combinations you try you will NOT be able to see syntax errors! Question: when I use the ini_set, does that stay set for the lifetime of the script executing or is it set for good? Only during the execution of the script. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Wouldn't this be a great world if being insecure and desperate were a turn-on? -- Broadcast News */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Chris Edwards wrote: but do I need to do something to get PHP to actually work off of these setting once they have been changed, Restart your web server. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
On Tuesday 20 January 2004 03:44, Chris Edwards wrote: Here's a snippet from my PHI_INI ; - Show all errors ; error_reporting = E_ALL ;error_reporting = E_ALL ~E_NOTICE ~E_WARNING ~E_CORE_WARNING ~E_USER_WARNING ~E_USER_NOTICE ~E_COMPILE_WARNING display_errors = On With those settings you should be able to see syntax errors. The commented out error_reporting was the original setting and display_errors was Off I changed them to the values you see above. When I execute my script and use init_get() the values appear to be right, but do I need to do something to get PHP to actually work off of these setting once they have been changed, i.e. some kind of refresh You need to restart the webserver for any changes in php.ini to take effect. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* What passes for woman's intuition is often nothing more than man's transparency. -- George Nathan */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error Reporting help
My hosting company recently upgraded to PHP 4.3.0. Since doing this I no longer get syntax type errors, from my typo's inside my PHP scripts. These use to come up in my browser when that page was requested and the script run. I have spent hours going through the online help, trying to set a number of the error reporting levels and parameters but cannot get to where it will report on a syntax error. For example if I code echo This is a syntax error because of the double quote start and the single quote end '; I just get a blank screen. I have 14 pages of PHP settings printed out, so for any kind person that can help, I can respond with their values quickly. Thanks Chris Edwards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Chris Edwards wrote: [cut] For example if I code echo This is a syntax error because of the double quote start and the single quote end '; I just get a blank screen. I have 14 pages of PHP settings printed out, so for any kind person that can help, I can respond with their values quickly. Try putting this at the beginning of your script: ini_set('display_errors', 1); -- Seks, seksi, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne ksztaty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Chris Edwards wrote: My hosting company recently upgraded to PHP 4.3.0. Since doing this I no longer get syntax type errors, from my typo's inside my PHP scripts. These use to come up in my browser when that page was requested and the script run. You probably need to have them turn on display_errors (or do so yourself with an .htaccess file, if allowed). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
Tried that, thanks, no joy. It's almost like it parses it before it tries to execute any lines and if a syntax error occurs, it doesn't execute any of the script. The prior version would run up until the syntax error and then give you the line if error, which usually meant the syntax error was on the previous line. Adam I Agnieszka Gasiorowski Fnord [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Chris Edwards wrote: [cut] For example if I code echo This is a syntax error because of the double quote start and the single quote end '; I just get a blank screen. I have 14 pages of PHP settings printed out, so for any kind person that can help, I can respond with their values quickly. Try putting this at the beginning of your script: ini_set('display_errors', 1); -- Seks, seksiæ, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne kszta³ty... http://www.opera.com 007 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Reporting help
On Monday 19 January 2004 07:30, Chris Edwards wrote: It's almost like it parses it before it tries to execute any lines and if a syntax error occurs, it doesn't execute any of the script. That's right. The prior version would run up until the syntax error and then give you the line if error, which usually meant the syntax error was on the previous line. I don't think any version of PHP has ever done that. More likely your prior version of PHP had display_errors enabled. In general you can enable and display all errors using: error_reporting (E_ALL); ini_set('display_errors', 1); But if display_errors (in php.ini) is disabled then syntax errors will not be displayed -- they can only be viewed in the error log. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Most people will listen to your unreasonable demands, if you'll consider their unacceptable offer. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php