[php] Where does PHP's error log reside in XAMPP?

I've been using XAMPP for Windows.

Where does PHP's error log reside in XAMPP?

This question is related to php apache xampp

The answer is


You can also open the xampp control panel and click on the Button "logs":

enter image description here


This might be a simple case of the PHP error log being turned off.


Look in your configuration file and search for the error_log setting. Or use phpinfo() to find this setting.


\xampp\apache\logs\error.log is the default location of error logs in php.


For my issue, I had to zero out the log:

sudo bash -c ' > /Applications/XAMPP/xamppfiles/logs/php_error_log '


As said above you can find PHP error log in windows. In c:\xampp\apache\logs\error.log. You can easily display the last logs by tail -f .\error.log


By default xampp php log file path is in /xampp_installation_folder/php/logs/php_error_log, but I noticed that sometimes it would not be generated automatically. Maybe it could be a Windows account write permission problem? I am not sure, but I created the logs folder and php_error_log file manually and then php logs were logged in it finally.


You can simply check you log path from phpmyadmin

run this:

http://localhost/dashboard/

now click PHPInfo (top right corner) or you can simply run this url in your browser

http://localhost/dashboard/phpinfo.php

now search for "error_log"(without quotes) You will get log path.

Enjoy!


I found it in: \xampp\php\logs\php_error_log


For any one searching for the php log file in XAMPP for Ubuntu, its:

/opt/lampp/logs/php_error_log

Most probably it will be having a big size (mine was about 350 mbs) and it slowed down my text editor after opening. If you do not care about all the past logs you can empty the file easily by simply going to the terminal and then writing these three lines one by one:

sudo su 
cd /opt/lampp/logs/
> php_error_log

And newer logs will be easy and fast to open now.

Hope some Ubuntu user finds it helpful.


For mac users XAMPP Version 1.7.3

/Applications/XAMPP/xamppfiles/logs/error_log

\xampp\php\logs did not exist at all for me - for whatever reason.

I simply had to create a folder in \xampp\php\ called logs and then the php_error_log file was created and written to.


Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to apache

Enable PHP Apache2 Switch php versions on commandline ubuntu 16.04 Laravel: PDOException: could not find driver How to deploy a React App on Apache web server Apache POI error loading XSSFWorkbook class How to enable directory listing in apache web server Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details How to enable php7 module in apache? java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing while starting Apache server on my computer

Examples related to xampp

Xampp localhost/dashboard phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO) Is there way to use two PHP versions in XAMPP? Where to find htdocs in XAMPP Mac phpMyAdmin access denied for user 'root'@'localhost' (using password: NO) How to downgrade php from 7.1.1 to 5.6 in xampp 7.1.1? How to turn on/off MySQL strict mode in localhost (xampp)? mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it How to install mcrypt extension in xampp Fatal error: Uncaught Error: Call to undefined function mysql_connect()