php.ini settings reference
A quick guide to the PHP settings most often behind failed uploads, memory errors and timeouts.
Find the configuration your website uses
Run php --ini for the command line setup. Your website may use a different PHP version or configuration file. For the web request, check the “Loaded Configuration File” field in a private phpinfo() page. Create and remove that page safely.
Settings to check first
| Directive | What it controls | When to review it |
|---|---|---|
memory_limit | Memory available to one PHP request. | A logged “Allowed memory size exhausted” error. |
upload_max_filesize | Largest single uploaded file. | An upload fails or is rejected. |
post_max_size | Maximum size of an entire request body. | Uploads fail even when the file is below the per-file cap. Keep this above upload_max_filesize. |
max_execution_time | Time a PHP script may run. | A long task stops; check web server and proxy timeouts too. |
display_errors | Whether PHP errors appear in the response. | Keep it off on public sites and use private error logs to diagnose faults. |
Change one thing, then test
Back up the current setting, make a scoped change through your host or PHP pool, reload the service if required, and repeat the failing request. Do not assume a larger limit fixes the cause. Get help with PHP configuration when several layers disagree.