# Large uploads fail

UrbeStack sysadmin note about PHP. Last updated 30 Nov 2026.

A file larger than 64 MB fails to upload, and PHP logs `POST Content-Length of ... bytes exceeds the limit of 67108864 bytes` with the request's size. The domain's `upload_max_filesize` and `post_max_size` both default to 64 MB, and raising both fixes the upload.

## Symptoms

The application receives no file and often shows no error of its own. Run `urbestack-domain-log --name example.com --type php` to see the warning in the domain's PHP log.

```output
[30-Nov-2026 08:12:35 UTC] PHP Warning:  PHP Request Startup: POST Content-Length of 70000208 bytes exceeds the limit of 67108864 bytes in Unknown on line 0
```

When `post_max_size` is larger than `upload_max_filesize`, a file that exceeds the file limit can arrive with PHP upload error `1`, `UPLOAD_ERR_INI_SIZE`. Applications report it as `The uploaded file exceeds the upload_max_filesize directive in php.ini.`

## Cause

`upload_max_filesize` limits the size of one uploaded file. `post_max_size` limits the size of the whole request. Both default to 64 MB.

When a request exceeds `post_max_size`, the site receives no files or form fields.

## Resolution

Raise both limits for the domain. Set `post_max_size` at least as high as `upload_max_filesize`, with a little extra room for the other form fields.

```
urbestack-domain-set --name example.com --php-setting upload_max_filesize=256M --php-setting post_max_size=260M
```

Upload the file again.

If the problem persists after you follow this note, you can [open a support ticket](https://support.urbestack.com/new?type=support). Including the output of the commands you ran helps support diagnose the problem.
