Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » memory limit exhausted with larger number of assets

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

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

Page: 1 2
Go to End
Author Topic: 75788 Views
  • nomen
    Avatar
    Community Member
    52 Posts

    Re: memory limit exhausted with larger number of assets Link to this post

    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.

    75788 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.