Вопрос

This PHP is set to log an entry into a log file, works fine on localhost but when I upload it to server it doesn't add anything to the logfile. It also does not display any errors. I even tried echoing a undefined variable and still no errors in the logfile...

ini_set('error_reporting', E_ALL);
error_reporting(E_ALL);
ini_set('log_errors',TRUE);
ini_set('html_errors',FALSE);
ini_set('error_log',dirname(__FILE__)."/prepop.log");
define("LOG_FILE", dirname(__FILE__)."/prepop.log");
error_log(date('[Y-m-d H:i e] '). "TESTING LOG 123" . PHP_EOL, 3, LOG_FILE);
echo LOG_FILE; exit;

What am I missing??

Это было полезно?

Решение

Please set the require permissions to write the Log file.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top