Welcome Guest, Not a member yet? Register   Sign In
No-CMS, A Free CodeIgniter based CMS to start your project
#86

[eluser]mrgswift[/eluser]
[quote author="goFrendiAsgard" date="1351151624"]
@mrgswift: qq library is not written by me. But I think yes, there is a problem with file size limit. Thanks to find it out. I'll try to fix it
[/quote]

Hi goFrendiAsgard,

I figured out what was wrong a few weeks ago and thought I would post it here. There is a problem with the if statement In the file modules/wysiwyg/fileuploader_library/php.php on lines 121 to 124

Code:
if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){
            $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';            
            die("{'error':'increase post_max_size and upload_max_filesize to $size'}");    
        }


If you notice what this if statement is doing, anytime the postSize or uploadSize is less than the sizeLimit, it will die and display the error message that you need to increase your post_max_size and upload_max_filesize. This should be the other way around. Line 121 should be changed to:

Code:
if ($postSize > $this->sizeLimit || $uploadSize > $this->sizeLimit){
This way the if statement is checking whether postSize and uploadSize is greater than the sizeLimit. I believe this was the original intent for having this if statement here, but was probably written quickly without realizing the mistake.

Thanks for your hard work goFrendiAsgard!



Messages In This Thread
No-CMS, A Free CodeIgniter based CMS to start your project - by El Forum - 12-03-2012, 04:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB