php.ini setting, Is it important? |
php.ini setting, Is it important? |
Dag |
Oct 21 2008, 04:44 AM
Post
#1
|
Advanced Member Group: Members Posts: 107 Joined: 24-October 06 Member No.: 549 |
What will use the real professional in his php.ini setting:
CODE error_reporting = E_ALL; & ~E_NOTICE or error_reporting = E_ALL & ~E_NOTICE |
Christian J |
Oct 21 2008, 05:32 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
My php.ini ("the recommended, PHP 5-style version of the php.ini-dist file") contains the following example:
CODE ; - Show all errors, except for notices and coding standards warnings ; ;error_reporting = E_ALL & ~E_NOTICE In my understanding semi-colons comment out the rest of a line, if that's correct this: CODE error_reporting = E_ALL; & ~E_NOTICE should work the same as CODE error_reporting = E_ALL; |
Dag |
Oct 21 2008, 06:45 AM
Post
#3
|
Advanced Member Group: Members Posts: 107 Joined: 24-October 06 Member No.: 549 |
Actually, my question is next: how many people do use E_NOTICE errors? So many advices "Switch them off" etc. etc. Accent were not in writing or meaning but in using.
|
Christian J |
Oct 21 2008, 09:50 AM
Post
#4
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
For a single site, or many sites on a shared server?
Enabling it globally on a shared server seems risky, e.g. this page mentions potential problems with older code: http://bealers.com/2007/08/16/setting-php-...st-or-htaccess/ You can use it for debugging while making an individual site, but then it's probably better to enable it separately for that site (e.g. through a htaccess directive). Once a site is made public it's maybe more secure to hide all(?) error reporting from malicious users. |
Dag |
Oct 22 2008, 04:42 AM
Post
#5
|
Advanced Member Group: Members Posts: 107 Joined: 24-October 06 Member No.: 549 |
Something like that... agree. PHP errors are for developers while they are created their scripts and pages. Users are not important. But error NOTICE is everywhere mentioned as "never mind". I am not sure that it is correct.
|
Lo-Fi Version | Time is now: 23rd April 2024 - 02:47 AM |