php:php
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| php:php [2022/10/29 16:15] โ external edit 127.0.0.1 | php:php [2025/11/10 13:52] (current) โ [Debug error in nginx with php-fpm] admin | ||
|---|---|---|---|
| Line 69: | Line 69: | ||
| ErrorLog " | ErrorLog " | ||
| LogLevel error | LogLevel error | ||
| + | </ | ||
| + | ==== Debug error in nginx with php-fpm ==== | ||
| + | You set it per pool, inside: **/ | ||
| + | < | ||
| + | [www] | ||
| + | ................ | ||
| + | catch_workers_output = yes | ||
| + | php_admin_flag[log_errors] = on | ||
| + | php_admin_value[error_log] = / | ||
| + | </ | ||
| + | Then restart PHP-FPM | ||
| + | |||
| + | Example Before vs After | ||
| + | * Before (catch_workers_output = no):< | ||
| + | [10-Nov-2025 10:30:21] WARNING: [pool www] child 12345 exited on signal 11 (SIGSEGV) | ||
| + | </ | ||
| + | * After (catch_workers_output = yes):< | ||
| + | [10-Nov-2025 10:30:21] WARNING: [pool www] child 12345 said into stderr: "PHP Fatal error: Uncaught Error: Call to undefined function get_header() in / | ||
| + | </ | ||
| + | โ Now you can see the exact file and line that crashed WordPress. | ||
| + | ๐ ๏ธ Combine With These for Full Debugging, Inside the same pool file or your **php.ini**:< | ||
| + | log_errors = On | ||
| + | error_reporting = E_ALL | ||
| + | display_errors = Off | ||
| </ | </ | ||
| ==== Config in web server to display error log ==== | ==== Config in web server to display error log ==== | ||
php/php.1667060147.txt.gz ยท Last modified: by 127.0.0.1
