Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

memory limit exhausted with larger number of assets


Go to End


9 Posts   76902 Views

Avatar
nomen

Community Member, 52 Posts

6 October 2008 at 11:11pm

Edited: 06/10/2008 11:12pm

Hi all:
If you can´t change the memory limit, go to /cms/code/AssetAdmin.php
And change getUsedFilesList from:

private function getUsedFilesList() {
        $result = DB::query("SELECT DISTINCT FileID FROM SiteTree_ImageTracking");
        $usedFiles = array();
        $where = "";
        if($result->numRecords() > 0) {
        .....

to:
private function getUsedFilesList() {
       $result = DB::query("SELECT DISTINCT FileID FROM SiteTree_ImageTracking");
        $usedFiles = array();
        $where = "";
        return $where;
        if($result->numRecords() > 0) {

        .....

I don´t know if this is the best way, but works for me.

Go to Top