Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Allowed memory size of 134217728 bytes exhausted #56

Closed
billzt opened this issue Oct 25, 2016 · 10 comments
Closed

Fatal error: Allowed memory size of 134217728 bytes exhausted #56

billzt opened this issue Oct 25, 2016 · 10 comments

Comments

@billzt
Copy link

billzt commented Oct 25, 2016

I have a file of ~500MB already on my server. When I try to download it through RichFilemanager, it calls:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 575025152 bytes) in /var/www/html/RichFilemanager/connectors/php/LocalFilemanager.php on line 683

Well, my memory_limit of php is 128MB. Should I just need to increase it?

@simogeo
Copy link
Contributor

simogeo commented Oct 25, 2016

FYI, see simogeo/Filemanager#510

@psolom
Copy link
Owner

psolom commented Oct 25, 2016

Are you sure you are trying to download file, not folder?
Cause I have got similar error while downloading folder with big media file. RFM try to zip it and fails with memory size error. But I'm unable to catch it when I try to download the media file directly.

Btw what vervion of RFM you use? master or dev branch?

@psolom
Copy link
Owner

psolom commented Oct 25, 2016

I have fixed the error that happened upon folder downloading (my case) at the DEV branch. Your case still require details and investigation.

@billzt
Copy link
Author

billzt commented Oct 26, 2016

@servocoder I'am trying to download a zip file, which contains several files in it. I don't know how many files in it

@psolom
Copy link
Owner

psolom commented Oct 26, 2016

Files downloading process shouldn't cause such type of error.
You haven't answered about the version of RichFilenamager you use and the branch where you get it (dev or master). Information about your platform (Linux/Windows) can be helpful as well. Also share the code snippet you have at /var/www/html/RichFilemanager/connectors/php/LocalFilemanager.php on line 683, and lines beside line 683, please.

@billzt
Copy link
Author

billzt commented Oct 26, 2016

Well, current my version is the previous master branch, commit 245d50c

My platform is Linux, CentOS 6.8, PHP 5.6.6

LocalFilemanager.php on line 683:

        header('Content-Description: File Transfer');
        header('Content-Type: ' . mime_content_type($current_path));
        header('Content-Disposition: attachment; filename=' . $filename);
        header('Content-Transfer-Encoding: binary');
        header('Content-Length: ' . $this->get_real_filesize($current_path));
        // handle caching
        header('Pragma: public');
        header('Expires: 0');
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');

(Line   683)    readfile($current_path);
        $this->__log('file downloaded "' . $current_path . '"');
        exit();
    }

@psolom
Copy link
Owner

psolom commented Oct 26, 2016

Thanks for the details. I will try to reproduce it.

BTW you could also do some stuff to help. If possible, test your issue at the DEV branch. So we can ensure that the problem exists (or solved) at the latest version.

@psolom
Copy link
Owner

psolom commented Oct 30, 2016

Check out the latest commit on DEV branch. The problem should be fixed.

@billzt
Copy link
Author

billzt commented Oct 31, 2016

Well, I check the commit de5bbf7 and manually merge it to release versions (such as 1.0.5) and it is OK. The DEV branch fails to set up the main RichFileManager instance, perhaps there exists too many commits and includes additional bugs

@psolom
Copy link
Owner

psolom commented Oct 31, 2016

Glad to hear it works for you. You can face problems with DEV branch because of changes in the config files and other incompatible changes. It will be released as RichFilemenager v.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants