W3docs

Where does PHP's error log reside in XAMPP?

In XAMPP, the error log for PHP is typically located at {xampp-install-directory}/php/logs/php_error_log.

In XAMPP, the PHP error log is typically located at {xampp-install-directory}/php/logs/php_error_log. For a standard Windows installation, this is usually C:\xampp\php\logs\php_error_log. You can find the installation directory by checking the XAMPP_HOME environment variable or by examining the extension_dir directive in php.ini.

The XAMPP Control Panel's "Logs" button primarily displays Apache and MySQL logs. To view PHP errors, you will need to open the php_error_log file directly in a text editor, or verify the exact path using phpinfo() or a simple PHP script:

<?php echo ini_get('error_log'); ?>

If you are having trouble finding the error log or if it is not being generated, check the value of the error_log directive in php.ini. This directive specifies the location of the error log file and may be set to a different path or filename. Ensure that log_errors is enabled so that PHP actually writes to this file.