|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64888 Integer Overflow when processing MAX_FILE_SIZE
Submitted: 2013-05-21 13:10 UTC Modified: 2016-08-21 04:22 UTC
Avg. Score:3.3 ± 1.2
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php at paalsteek dot de Assigned: cmb (profile)
Status: No Feedback Package: FPM related
PHP Version: 5.4.15 OS: Arch Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: php at paalsteek dot de
New email:
PHP Version: OS:


 [2013-05-21 13:10 UTC] php at paalsteek dot de
When uploading files I get an error UPLOAD_ERR_FORM_SIZE when setting MAX_FILE_SIZE in the input form to values greater or equal to 2147483648 (2^31).
This problem does not exist on a CentOS 6.4 using Apache 2.2.15. Therefore I guess this is an implementation specific problem of php-fpm.

Test script:
HTML form:
<form action="" method="post" enctype="multipart/form-data">
<input id="max_upload" type="hidden" value="2147483648" name="MAX_FILE_SIZE" original-title="">
<input id="requesttoken" type="hidden" value="013ac1f5ecd5e025b1ee" name="requesttoken" original-title="">
<input class="max_human_file_size" type="hidden" value="(max 2.3 GB)" original-title="">
<input id="dir" type="hidden" value="/" name="dir" original-title="">
<input type="file" name="test" />
<input type="submit" />

PHP code:


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-08 17:05 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-08-08 17:05 UTC]
> Therefore I guess this is an implementation specific problem of
> php-fpm.

I'm not sure. It might as well be related to respective variables
being defined as int[1] (whose size is platform specific). This
has changed, however, as of PHP 5.6.0 to int64_t[2].

Has this change solved the issue for you?

[1] <>
[2] <>
 [2016-08-21 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 00:01:27 2024 UTC