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

Huge folders - Picture view issue #565

Closed
szporwolik opened this issue Nov 23, 2012 · 6 comments
Closed

Huge folders - Picture view issue #565

szporwolik opened this issue Nov 23, 2012 · 6 comments
Labels

Comments

@szporwolik
Copy link

It's impossible to browse huge photo folder with the Pictures plugin.

I have folder tree which contains about 30000 photos (all JPG files, approx. 1,5mb each); when I try to browse with "Pictures" I get the following error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12864 bytes) in /home/xxx/public_html/share/lib/image.php on line 419

System information:
ownCloud 4.5.2
Linux XXX 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:
PHP 5.3.x

@DeepDiver1975
Copy link
Member

hmm - a max mem size of 32MB seams a little bit low
As a workaround you can increase the memory limit in your .htaccess:

php_value memory_limit 128M

May this helps until we find a real solution.
@karlitschek Does it make sense to specify a minimum ram requirement and check this on setup or in the admin section? THX

@birdyisme
Copy link

hi , i have the same issue.
To solve it i have made these change on apps/gallery/lib/managers.php

rewrite function getThumbnailInfo :

public function getThumbnailInfo($path) {
        $arr = DatabaseManager::getInstance()->getFileData($path);

        if (!$arr) {
            if (file_exists ($path)) {
                $size = getimagesize($path);
                $arr = DatabaseManager::getInstance()->setFileData($path, $size[0], self::THUMBNAIL_HEIGHT);
            } else {
                \OC_Log::write(self::TAG, 'File '.$path.' don\'t exists', \OC_Log::WARN);
                return false;
            }

        }
        $ret = array('filepath' => $arr['path'],
                     'width' => $arr['width'],
                     'height' => $arr['height']);
        return $ret;
    }

I don't know if this is the best method, but it work ;-)

@BernhardPosselt
Copy link
Contributor

Please send a pull request

@BernhardPosselt
Copy link
Contributor

cc @icewind1991 is this fixed in the new pictures app?

@icewind1991
Copy link
Contributor

I think it is, I never had any memory problems with the new pictures app with 15k+ images

@BernhardPosselt
Copy link
Contributor

Unless there are any furhter problems I'll close this issue. Please check out the newer version and report in if you've still have problems to reopen the issue.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants