Personal Catalogue: PHP & MySQL — Chapter 9, Exercise 3 ==================================================== TASK Set display_errors = Off and log_errors = On in a local PHP test setup, deliberately trigger a real PHP error (e.g. calling an undefined function), and confirm the error is genuinely absent from the browser output while still appearing in the configured log file. SOLUTION 1. Locate the local php.ini in use (php --ini shows the loaded file path), or scope the settings to a single test file/directory via a .htaccess (if using Apache with mod_php): php_flag display_errors Off php_flag log_errors On php_value error_log /tmp/php_test_errors.log Or directly in php.ini: display_errors = Off log_errors = On error_log = /tmp/php_test_errors.log 2. Restart the web server (or PHP-FPM) so the new settings take effect. 3. Create a small test file: