In my php.ini
file on wampserver I have the following lines set:
error_reporting = E_ALL
display_errors = On
Yet, I have to actually call error_reporting(E_ALL)
in my script in order for it to actually show the errors.
Why is this happening? I'm getting to my php.ini
through the wampserver icon -> php -> php.ini
I was using the @
suppression modifier in front of call_user_func_array
in my Router front-end controller class which was resetting error_reporting
to 0
.
In WAMPServer there are 2 php.ini
files:
\wamp\bin\php\php{version}\php.ini
(controls only PHP CLI)
and the one that controls the Apache/PHP environment.
Edit the Apache version by using the wampmanager
menus, so you get the right one.
wampmanager->PHP->php.ini
This will open the correct file in your default editor. Change the parameters in this file, save it and restart Apache.
BEWARE: If as you say you are using the correct method to edit the correct file -
These parameters are also documented at the top of the
php.ini
file, do not change the documentation version, look further down the file and edit the actual parameters there.