Я администратор Linux и недостаточно знаком с PHP и журналированием, чтобы понять это. . Я хотел бы изменить php.ini, чтобы регистрировать дополнительную информацию об ошибках Apache 500, а точнее об ошибках, вызванных joomla. Вот что у меня есть на данный момент:
Код: Выделить всё
display_errors = Off
html_errors = On
display_startup_errors = On
log_errors = On
output_buffering = Off
error_reporting = E_ALL
error_log = /var/log/php_errors.log
expose_php = Off
Вот пример из моего журнала доступа Apache для этого домена, показывающий типичную ошибку 500:
Код: Выделить всё
13.59.58.209 - - [20/Sep/2024:06:40:35 -0400] "GET /advisories HTTP/1.1" 500 481
r:"https://example.com/advisories/red-hat" "Mozilla/5.0 AppleWebKit/537.36 (KHTML,
like Gecko; compatible; ClaudeBot/1.0; [email protected])"
Некоторые ошибки PHP сохраняются в журнале ошибок apache, в зависимости от моих настроек Apache. Например:
Код: Выделить всё
[Thu Sep 19 11:00:46.720026 2024] [proxy_fcgi:error] [pid 863110:tid 863147]
[client 40.77.167.65:0] AH01071: Got error 'PHP message: PHP Deprecated:
strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated
in /var/www/www.example.com/html/plugins/system/autotweetcontent/autotweetcontent.php on line 86'
Код: Выделить всё
[Sun Sep 22 13:05:39.035262 2024] [authz_core:error] [pid 2410993:tid 2411038]
[client 143.198.222.185:0] AH01630: client denied by server configuration:
/var/www/www.example.com/html/libraries/joomla
Код: Выделить всё
[22-Sep-2024 13:16:34] WARNING: [pool example] child 2215306, script
'/var/www/www.example.com/html/index.php' (request: "POST /index.php") executing
too slow (4.913751 sec), logging
Код: Выделить всё
[22-Sep-2024 13:26:15] [pool example] pid 2194046
script_filename = /var/www/www.example.com-443/html/index.php
[0x00007fd1d9213db0] curl_exec() /var/www/www.example.com/html/plugins/system/cleantalkantispam/lib/Cleantalk/Common/Http/Request.php:216
Файл php_error.log также редко отображает какую-либо полезную информацию.
Подробнее здесь: https://stackoverflow.com/questions/790 ... nd-php-fpm