I’m using XAMPP to develop on my localhost. I would like to remove the PHP notices and keep only the warnings. I know this is done through the php.ini
file, however I’m having trouble locating it. I followed the path in phpinfo()
and it led me to /xampp/php
. Inside this folder are two php.ini
files: one for production and one for development. I have set them both to the error reporting level I’d like, however I still receive notices which makes me believe that neither of these actually control error reporting. I’m using the latest version of XAMPP. So I guess my question is where is the true php.ini
and what are these two other versions?
Advertisement
Answer
First, make sure you’re editing php.ini
, not php-development.ini
or php-production.ini
or anything BUT php.ini
. After that, ensure you restart your Apache server or your changes won’t take effect.
Also, check out ini_set for setting ini values at runtime.