2022年7月13日
-
error_log | no value | no value |
1 2 3 4 5 6 7 | ; Log errors to specified file. PHP's default behavior is to leave this value ; empty. ; http://php.net/error-log ; Example: ;error_log = php_errors.log ; Log errors to syslog (Event Log on NT, not valid in Windows 95). ;error_log = syslog |
1 2 3 4 5 6 7 | ; Log errors to specified file. PHP's default behavior is to leave this value ; empty. ; http://php.net/error-log ; Example: error_log = /var/log/php_errors.log ; Log errors to syslog (Event Log on NT, not valid in Windows 95). ;error_log = syslog |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ; error_reporting ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; and forward compatibility of your code ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's ; initial startup ; E_COMPILE_ERROR - fatal compile-time errors ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) ; E_USER_ERROR - user-generated error message ; E_USER_WARNING - user-generated warning message ; E_USER_NOTICE - user-generated notice message ; E_DEPRECATED - warn about code that will not work in future versions ; of PHP ; E_USER_DEPRECATED - user-generated deprecation warnings ; ; Common Values: ; E_ALL (Show all errors, warnings and notices including coding standards.) ; E_ALL & ~E_NOTICE (Show all errors, except for notices) ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT ; http://php.net/error-reporting error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT |
1 2 | #error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT error_reporting = E_ALL | E_STRICT |
cd /var/log
1 2 3 4 5 6 7 8 9 | root@chantyou:log # pwd /var/log root@chantyou:log # touch /var/log/php_errors.log root@chantyou:log # ls /var/log/php_errors.log -l -rw-rr 1 root root 0 Jul 28 16:03 /var/log/php_errors .log root@chantyou:log # chmod +rw /var/log/php_errors.log root@chantyou:log # ls /var/log/php_errors.log -l -rw-rr 1 root root 0 Jul 28 16:03 /var/log/php_errors .log root@chantyou:log # |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | root@chantyou:log # service httpd restart Redirecting to /bin/systemctl restart httpd.service root@chantyou:log # service httpd status Redirecting to /bin/systemctl status httpd.service httpd.service - The Apache HTTP Server Loaded: loaded ( /usr/lib/systemd/system/httpd .service; disabled) Active: active (running) since Tue 2015-07-28 16:05:13 CST; 7s ago Process: 6858 ExecStop= /bin/kill -WINCH ${MAINPID} (code=exited, status=0 /SUCCESS ) Process: 2224 ExecReload= /usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0 /SUCCESS ) Main PID: 6864 (httpd) Status: "Processing requests" CGroup: /system .slice /httpd .service ├─6864 /usr/sbin/httpd -DFOREGROUND ├─6866 /usr/sbin/httpd -DFOREGROUND ├─6867 /usr/sbin/httpd -DFOREGROUND ├─6868 /usr/sbin/httpd -DFOREGROUND ├─6869 /usr/sbin/httpd -DFOREGROUND └─6870 /usr/sbin/httpd -DFOREGROUND Jul 28 16:05:13 chantyou.com httpd[6864]: AH00548: NameVirtualHost has no effect and will be removed in the next release /e conf:1 Jul 28 16:05:13 chantyou.com httpd[6864]: AH00558: httpd: Could not reliably determine the server's fully qualified domain essage Jul 28 16:05:13 chantyou.com systemd[1]: Started The Apache HTTP Server. Hint: Some lines were ellipsized, use -l to show in full. root@chantyou:log # |
1 2 | root@chantyou:log # tail /var/log/php_errors.log root@chantyou:log # |
error_log | /var/log/php_errors.log | /var/log/php_errors.log |