Why error log in PHP is disabled as default?

UmairHussain

Beta member
Messages
2
Location
Karachi, Pakistan
Hello everyone,

I was not much of a PHP fan, because I've been using and creating websites on WordPress (the beloved drag and drop drama). When practicing on PHP, I learned about the php error logging and noticed that by default, the error log in PHP is disabled and you can enable the error log in one of two ways: by editing php. ini or by using ini_set. Fortunately, I found an article that helps me in enabling PHP error logging. I'm just curious to know that why on the initial stage they haven't build-up the criteria to be enabled before, I mean it will be good if the default function is enabled during the PHP error logging stuff.
 

sunilkhorwal

Beta member
Messages
2
Location
Maharashtra
if someone deploying project on production then this default setting won’t shows the important details to the other user. These details could be your env details
 

carnageX

Private Joker,
Staff member
Messages
25,051
Location
Oregon
Because it may give implementation details about the system and environment that is running, and unless it's logged to a secure location, it could potentially be accessible to outside people. This shows security flaws in the application, system, etc. and makes it a target for attacks.
 
Top Bottom