where is the error_log file?

纵饮孤独 提交于 2019-12-01 10:00:46

问题


I already set

//don't display errors
ini_set('display_errors', 0);
//write errors to log
ini_set('log_errors', 1);
//error log file name
ini_set('log_errors', '/var/log/php/error.log');

but I cannot find the log file.

also checked the php.ini but there is no error log. I cannot find directory named var/log/apache or var/log/php

What I'm trying to do is Log the errors into a file, without showing it on browser

the problem :

  1. I don't see /var/log/ directory, instead I found /php/logs/ directory

  2. I cannot log the errors without showing it on browser, even after I use ini_set() function


回答1:


Try

\xampp\apache\logs\error.log

where xampp is your installation folder

If you haven't changed the error_log setting in PHP (check with phpinfo()), it will be logged to the Apache log.



来源:https://stackoverflow.com/questions/43314089/where-is-the-error-log-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!