post_max_size limits the size of the entire HTTP POST body received by PHP. It includes submitted form fields and uploaded files together. When the request exceeds this limit, an application can receive empty POST and file data even though the visitor selected a file.
IN THIS ARTICLE
Prepare for the change
Identify whether the failed operation is a form submission, multi-file upload or import. Measure the total request rather than only its largest file. Keep the current value and check hosting storage, memory and application restrictions before making changes.
01 Change the setting
- In DirectAdmin, open the appropriate user account and domain, then search for Select PHP Version. In Evolution it may appear under Extra Features. Open the CloudLinux selector, not an unrelated server administration page.
- Check the active PHP version and which websites the selector change will affect. DirectAdmin can expose both its native PHP selection and CloudLinux PHP Selector. The selected domain in DirectAdmin does not by itself prove that an Alt-PHP change is isolated to that domain. Check the selector scope before applying an account-wide change.
- Open Options and locate post_max_size. Record the current setting.
- Choose a value larger than
upload_max_filesizeand large enough for the expected complete request, within the limits offered by your hosting service. Save the change. - Submit a representative test request and verify every expected field and attachment. If there are many small fields, investigate
max_input_varsseparately because it limits the number of parsed input variables.
02 Example: two files in one form submission
Suppose a permitted form uploads two files of about 20 MiB each. Neither file exceeds an illustrative upload_max_filesize of 32M, but the complete request exceeds 40 MiB once form fields and multipart overhead are included. A post_max_size of 32M would therefore be too small.
If your plan and application allow it, 64M is an example request allowance with room for this particular test. It is not a Nabtech plan entitlement or a universal recommendation. Set approved values through the active selector, then confirm that both attachments and every required form field arrived. Retain separate application limits and check proxy restrictions if PHP never receives the request.
Confirm the expected result
Confirm the effective setting in the web application and check the server log for the test submission. A correct result includes all expected fields and files; a success banner alone can conceal missing form values in poorly validated applications.
What should I check when a larger post_max_size does not resolve the request failure?
A larger POST limit does not change reverse proxy limits, timeouts or an application's import rules. Avoid using unlimited values to work around an unidentified failure. If the request succeeds partially, reduce its size and examine the application's validation before processing live orders or customer records.
Related articles
- Changing PHP versions, extensions and application limits
- Diagnosing website problems with error logs and account information
- Understanding CPU, RAM, storage, inodes and data transfer
- Changing the PHP upload_max_filesize limit with CloudLinux in DirectAdmin
- Managing PHP extensions with CloudLinux in DirectAdmin