Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Request #4930 HTML_Quickform maximum upload filesize should follow php.ini
Submitted: 2005-07-27 13:57 UTC
From: weseman at gmail dot com Assigned:
Status: Closed Package: HTML_QuickForm
PHP Version: 4.3.11 OS: OpenBSD
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 47 - 12 = ?

 
 [2005-07-27 13:57 UTC] weseman at gmail dot com
Description: ------------ HTML_Quickform uses a default maximum upload filesize of 1megabyte, which is set through the private property _maxFileSize. IMO, it would be better to follow the filesize specified by php.ini, as this is the value that finally decides what size an upload can be. Test script: --------------- Place this in the constructor: if (preg_match('/^([0-9]+)([a-zA-Z]*)$/', ini_get('upload_max_filesize'), $matches)) { // according to: // http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes // valid values are G, M or K, or no multiplier at all. switch (strtoupper($matches['2'])) { case 'G': $this->_maxFileSize = $matches['1'] * 1073741824; break; case 'M': $this->_maxFileSize = $matches['1'] * 1048576; break; case 'K': $this->_maxFileSize = $matches['1'] * 1024; break; default: $this->_maxFileSize = $matches['1']; } } Expected result: ---------------- Now Quickform will use the value in php.ini for upload_max_filesize

Comments

 [2005-08-04 21:18 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!