•  » Requests
  •  » admin/site_reader_local.php 'sync_exclude_folders' not used

#1 2025-01-22 17:44:13

fabien35235
Member
2024-01-13
4

admin/site_reader_local.php 'sync_exclude_folders' not used

Hello guys.

Environement
-----------------
I'm using piwigo on a Synology NAS

DSM, the Synology system, has a bad behavior:
it stores information (thumbnails etc...) in special directories, named @eaDir,
INSIDE the directories where photos & films are stored.

This includes a large database of all pictures in the NAS (Sic)
Of course, no-one wants piwigo to read this.

To avoid problems, I have used the local file editor:


$conf['sync_exclude_folders'] = array('@eaDir','A-classer',‘.Originals’); // pour exclure des répertoires

The Problem
----------------
NEVERTHELESS, piwigo sometimes reads @eaDIr, and this leads to issues:

Warning: opendir(./galleries/photo/@eaDir/SYNO@.fileindexdb): failed to open dir:
Permission denied in /volume1/web/piwigo/admin/site_reader_local.php on line 70
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16777216 bytes)
in /volume1/web/piwigo/admin/site_reader_local.php on line 111

When we read site_reader_local.php,
we can see that the directories from $conf['sync_exclude_folders'] ARE NOT CHECKED.
So, @eaDir is open.

/web/piwigo/admin/site_reader_local.php:
72: while (($node = readdir($contents)) !== false)
73:   {
74:     if ($node == '.' or $node == '..') continue;
75:
76:     if (is_file($path.'/'.$node))
77:     {
...
96: }
97:     else if (is_dir($path.'/'.$node)
98:              and $node != 'pwg_high'
99:              and $node != 'pwg_representative'
100:              and $node != 'pwg_format'
101:              and $node != 'thumbnail' )
102:      {
103:        $subdirs[] = $node;
104:      }

environment details, found on your Piwigo page [Administration > Tools > Maintenance]
--------------------------

    Piwigo 15.3.0 Dernière version ?
    Installé le 26 Juin 2023, il y a 1 an 6 mois 3 semaines 5 jours
    Système d'exploitation: Linux
    PHP: 7.4.30 (Montrer les informations) [2025-01-22 17:35:44]
    MySQL: 5.5.5-10.3.32-MariaDB [2025-01-22 17:35:44]
    Bibliothèque graphique: ImageMagick ImageMagick 6.9.11-22
    Taille du cache 4759.54 Mo   calculé il y a 11 mois Rafraîchir

Liste des plugins activés 3

    Admin Tools
    LocalFiles Editor
    VideoJS



Piwigo URL: http://

Offline

 
  •  » Requests
  •  » admin/site_reader_local.php 'sync_exclude_folders' not used

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact