簡體   English   中英

即使在php.ini中定義了error_log,也沒有php錯誤文件

[英]no php error file even though error_log is defined in php.ini

我在我的amazon ec2 linux盒子里運行php 5.5.20。 我在終端上做了以下的事情

[root]# cat /etc/php.ini | grep error_log

; server-specific log, STDERR, or a location specified by the error_log
; Set maximum length of log_errors. In error_log information about the source is
;error_log = php_errors.log
;error_log = syslog
error_log = /var/log/httpd/php_errors.log

請注意, error_log指令未被注釋掉。 但是,我在我的網站中遇到錯誤(即404錯誤,PDO錯誤等),但是甚至沒有創建php_errors.log文件。

我也試過chmod 777 /var/log/httpd/ ...但即使這樣也無濟於事

我還檢查了在php.ini設置中log_errors指令設置為On

確保您正在編輯正確的文件。

我見過EC2用戶有像/etc/php5/apache2/php.ini這樣的php.ini位置

您也可以嘗試在shell中locate php.ini

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM