From:             php at paalsteek dot de
Operating system: Arch Linux
PHP version:      5.4.15
Package:          FPM related
Bug Type:         Bug
Bug description:Integer Overflow when processing MAX_FILE_SIZE

Description:
------------
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:
<html>
<body>
<form action="https://owncloud.paalsteek.de/test.php"; 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" />
</form>
</body>
</html>

PHP code:
<?php

var_dump($_FILES["test"]["error"]);
?>


Expected result:
----------------
int(0)

Actual result:
--------------
int(2)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64888&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64888&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64888&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64888&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64888&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64888&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64888&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64888&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64888&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64888&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64888&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64888&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64888&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64888&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64888&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64888&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64888&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64888&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64888&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64888&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64888&r=mysqlcfg

Reply via email to