Re: [PHP] display_errors and error_reporting not enough?
I want to enable error messages while I'm testing or developing. I use php 5.2.4 on ubuntu server. These two lines does only print notices. ?php ini_set('display_errors', 1); error_reporting(E_ALL); ? When I make something wrong like syntax error; I get blank pages. Is there something else which I don't know? Here is the phpinfo(); http://77.79.86.103/phpinfo.php Googling brings only these two and variations of error_reporting parameters. hi, find the errors in your apache error log. also see error_log in PHP manual for details. virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] display_errors and error_reporting not enough?
When I make something wrong like syntax error; I get blank pages. Because the PHP code is not running (because of the syntax error), and thus not setting the error reporting as desired. You'll need to aither use a .htaccess file (if you're running Apache) or make the changes in your php.ini file (and restart your web server). Either way you won't be able to use the constants (which you use only in a PHP script. IIRC the correct directive would be: error_reporting 2047 -- Richard Heyes HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated February 14th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] display_errors and error_reporting not enough?
When I make something wrong like syntax error; I get blank pages. Because the PHP code is not running (because of the syntax error), and thus not setting the error reporting as desired. You'll need to aither use a .htaccess file (if you're running Apache) or make the changes in your php.ini file (and restart your web server). Either way you won't be able to use the constants (which you use only in a PHP script. IIRC the correct directive would be: error_reporting 2047 In other words try to set: display_errors=On error_reporting = E_ALL in your php.ini which is: /etc/php5/apache2/php.ini As far as I can see from you phpinfo page. So that you don't need to set it in every script during runtime as you mentioned. -- Thodoris
Re: [PHP] display_errors and error_reporting not enough?
Thodoris wrote: When I make something wrong like syntax error; I get blank pages. Because the PHP code is not running (because of the syntax error), and thus not setting the error reporting as desired. You'll need to aither use a .htaccess file (if you're running Apache) or make the changes in your php.ini file (and restart your web server). Either way you won't be able to use the constants (which you use only in a PHP script. IIRC the correct directive would be: error_reporting 2047 In other words try to set: display_errors=On error_reporting = E_ALL in your php.ini which is: /etc/php5/apache2/php.ini As far as I can see from you phpinfo page. So that you don't need to set it in every script during runtime as you mentioned. I would look at doing this only for a testing area, but not for a production area. If they are one in the same, then you could setup to different sub domains, one for testing and one for production. They can point to the same DOCUMENT_ROOT for that matter, just have different running configurations. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] display_errors and error_reporting not enough?
Thodoris wrote: When I make something wrong like syntax error; I get blank pages. Because the PHP code is not running (because of the syntax error), and thus not setting the error reporting as desired. You'll need to aither use a .htaccess file (if you're running Apache) or make the changes in your php.ini file (and restart your web server). Either way you won't be able to use the constants (which you use only in a PHP script. IIRC the correct directive would be: error_reporting 2047 In other words try to set: display_errors=On error_reporting = E_ALL in your php.ini which is: /etc/php5/apache2/php.ini As far as I can see from you phpinfo page. So that you don't need to set it in every script during runtime as you mentioned. I would look at doing this only for a testing area, but not for a production area. If they are one in the same, then you could setup to different sub domains, one for testing and one for production. They can point to the same DOCUMENT_ROOT for that matter, just have different running configurations. Totally agree on that since Jim has a very good point. You shouldn't leave error reporting active in a production domain because it reveals a great deal of information about your code making you site vulnerable to attacks. I suggested that assuming it is a testing-development domain. The less someone knows about how things work the more secure your site becomes. -- Thodoris