Question: I'm trying to upload a file larger than 2GB to a local PHP 5.3.4 server. I've set the following server variables:

```none
memory_limit = -1
post_max_size = 9G
upload_max_filesize = 5G

```

However, in the error\_log I found:

> 
> PHP Warning: POST Content-Length of 2120909412 bytes exceeds the limit of 1073741824 bytes in Unknown on line 0
> 
> 
> 

Can anyone tell me why this keeps failing please?

Answer: 
I had a similar problem, but my config was:

```
post_max_size = 1.8G
upload_max_filesize = 1.8G

```

and yet I could not upload a 1.2GB file. The error was very same:

```
PHP Warning:  POST Content-Length of 1347484420 bytes exceeds the limit of 1073741824 bytes in Unknown on line 0

```

I spent a day wondering where the heck was this "limit of 1073741824" coming from!

**Solution**:

Actually, the error was in the php.ini parser: It only understands INTEGER numbers, so essentially it was parsing `1.8G` as `1G` !!

Changing the value to e.g. `1800M` fixed it.

Pls ensure to restart the apache server with the below command **service apache2 restart**
As phliKtid mentioned, this is a limitation with the PHP framework. Save for editing the source code as mentioned in the [bug report](https://bugs.php.net/bug.php?id=44522) phliKtid linked, there is a workaround that involves setting the `upload_max_filesize` to 0 in the php.ini file.

```
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 0

```

By doing this, PHP will not crash when trying to convert "5G" into a 32-bit integer and you will be able to upload files as big as you allow with the "post\_max\_size" variable.