[ZendTo] Re: ZendTo Digest, Vol 47, Issue 1

Geoff Geoff at 3dmg.co.uk
Wed Jun 4 12:56:26 BST 2014


On 04/06/14 12:00, zendto-request at zend.to<mailto:zendto-request at zend.to> wrote:
Hi,

today was the first time a user uploaded a file larger that 2Gb and he
got the error:

/
Upload Error
There was an error while uploading 'orasrv11204install.zip'. The file
size exceeds the limit imposed by PHP on the server; please contact the
administrator regarding this problem.
\


I verified my configuration:

from php.ini

auto_prepend_file =
auto_append_file =
file_uploads = On
upload_max_filesize = 50G
session.save_handler = files
session.entropy_file =
apc.max_file_size = 50G

from preferences.php

'maxBytesForDropoff'   => 21474836470, // 20 GBytes
'maxBytesForFile'      => 21474836470, // 20 GBytes

from clamd.conf

LogFileMaxSize = "4294967295"
MaxConnectionQueueLength = "30"
StreamMaxLength = "26214400"
StreamMaxPort = "2048"
MaxThreads = "50"
MaxQueue = "100"
MaxDirectoryRecursion = "15"
MaxScanSize = "104857600"
MaxFileSize = "26214400"
MaxRecursion = "16"
MaxFiles = "10000"
MaxEmbeddedPE = "10485760"
MaxHTMLNormalize = "10485760"
MaxHTMLNoTags = "2097152"
MaxScriptNormalize = "5242880"
MaxZipTypeRcg = "1048576"
MaxPartitions = "50"
MaxIconsPE = "100"
OnAccessMaxFileSize = "5242880"
LogFileMaxSize = "1048576"
MaxAttempts = "3"

As far as I understand limits in clamd should not affect the process?


 >php --version
HP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

 >uname -a
Linux drop 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux

 >cat /etc/centos-release
CentOS release 6.5 (Final)

My system is 64bit and I started with the prebuild CentOS vmware image.
I regularly updated the system via yum update/upgrade.

Any ideas ? I appreciate your help.

Kind regards

PCFreak


Hi,

I believe this is an issue with PHP 5.3. Even though the system is 64bit, PHP uses 32bit integers for the post max size. This was fixed in PHP 5.4. Alternatively, if you do not wish to upgrade, you can set post_max_size = 0 and upload_max_filesize = 0 in your php.ini to skip the buggy check entirely.

See this PHP bug report for more info: https://bugs.php.net/bug.php?id=44522

Geoff King
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20140604/f74e76fe/attachment.html 


More information about the ZendTo mailing list