Ravi Sir's Cyber Security Cards › Revision Cards
Testing and Troubleshooting
Testing and Troubleshooting Finding why the app is broken, step by step. 502 : php-fpm not running. 403 : wrong file permissions. Access Denied from S3: wrong IAM role or old link. Changing code as soon as an error appears. Read the log first. The answer is usually in error.log .

Read card text
What this card says
What it is
Finding why the app is broken, step by step.
Common causes
502: php-fpm not running. 403: wrong file permissions. Access Denied from S3: wrong IAM role or old link.
Common mistake
Changing code as soon as an error appears.
Read the log first. The answer is usually in error.log.
| Symptom | Likely cause | Check / fix |
|---|---|---|
| 502 Bad Gateway | PHP-FPM stopped or wrong socket | sudo service php-fpm status; ls /run/php-fpm/ (Ubuntu… |
| Blank page / 500 | PHP error | sudo tail -f /var/log/php-fpm/www-error.log (Ubuntu:… |
| 413 Request Entity Too Large | Nginx body limit | client_max_body_size 60M; then nginx -t and reload |
| "Upload failed (error code 1)" | PHP upload_max_filesize too small | Check 99-reels.ini, restart PHP-FPM |
| "Could not store the video" | IAM role missing/wrong, wrong bucket or region | Log shows AWS error code; aws sts get-caller-identity;… |
Learn more in the lesson: 16.12 Testing and Troubleshooting