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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   76407 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