uploadprogress_get_info and large files
It seems that the PECL package "uploadprogress" works on files less then 10MB,
But Anything greater than 10MB, it fails miserably.
I've changed my php.ini to support larger upload, but 开发者_如何学Cit just doesn't return anything!
Any Help on this?
After changing upload_max_filesize and post_max_size to some larger value in php.ini. Then don't forget to restart apache.
A few things to note with uploadProgress.
Providing you have installed UploadProgress correctly, if you are still having issues and you have installed Modsecurity, read on.
If you are using modsecurity you will need to edit /etc/httpd/conf.d/modsecurity.conf using your favourite editor
Eg.
vi /etc/httpd/conf.d/modsecurity.conf
Modsecurity will stop uploadprogress working due to buffering issues.. in short you can fix this but at some security cost to your server:
First (and by doing so opening a security risk) edit the line:
SecRequestBodyAccess On
change the directive to
SecRequestBodyAccess Off
(after an apache/ server restart your upload progress should work!)
Don't forget if you have installed ModSecurity you will also need to edit a directive for large file uploads, as modsecurity takes charge of the max upload file size, to do so edit this directive:
SecRequestBodyLimit 3107200
as an example you will need to up the number in bits to allow the maximum bytes you intend to allow your users to upload.
10M would look like this:
SecRequestBodyLimit 10485760
Don't forget to restart your server
(for cent users you can do service httpd restart)
Both of these issues threw me for days! Hope it helps..
精彩评论