You are not logged in.
I have entity structure like this:
Root entity
Root entity > Company
Root entity > Company > Branch 1
Root entity > Company > Branch 2
Root entity > Company > Branch 3
Root entity > Company > Branch 4
Root entity > Company > Branch 5
Root entity > Company > Branch 6
Root entity > Company > Branch 7
Root entity > Company > Branch 8
Root entity > Company > Branch 9
Root entity > Company > Branch 10
Root entity > Company > Branch 11
Root entity > Company > Branch 12
Root entity > Company > Branch 13
Root entity > Company > Branch 14
Screenshot (pay attention to IDs) - imgur.com/a/7Qzs9La
My profile have Super-Admin (R) authorization on Root entity and Root entity > Company, so i can browse GLPI items like Company (tree structure)
If i try to filter any page by Location or Category or Requester or many other fields, i got "The results could not be loaded." in GUI and errors like this in apache logs:
PHP Fatal error: Uncaught Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheInvalidArgumentException: Invalid key "glpi_entities_ancestors_cache_1|2|3|4|5|6|7|8|9|10|11|12|13|14|15" provided; key is too long. Must be no more than 64 characters in /var/www/glpi/vendor/zendframework/zend-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php:344\nStack trace:\n#0 /var/www/glpi/vendor/zendframework/zend-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php(279): Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheDecorator->validateKey('glpi_entities_a...')\n#1 /var/www/glpi/inc/dbutils.class.php(802): Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheDecorator->has('glpi_entities_a...')\n#2 /var/www/glpi/inc/dbutils.class.php(563): DbUtils->getAncestorsOf('glpi_entities', Array)\n#3 /var/www/glpi/inc/db.function.php(653): DbUtils->getEntitiesRestrictRequest(' AND ', 'glpi_locations', '`glpi_locations...', Array, true, false)\n#4 /var/www/glpi/inc/dropdown.class.php(2369): getEntitiesRestrictRequest(' AND ', 'glpi_locations', '', Array, true)\n#5 /var/www/glpi/ajax/getDropdownVal in /var/www/glpi/vendor/zendframework/zend-cache/src/Psr/SimpleCache/SimpleCacheDecorator.php on line 344, referer: http://192.168.31.202/front/ticket.php
If i switch to Root entity (tree structure), error gone and filter contents loading normal.
Other workaround i found (but no way anyone can do this in production) is to delete several entities. After this ofcourse key "glpi_entities_ancestors_cache_ID|OF|ALL|NESTED|ENTITIES" will fit in 64 characters.
I got this error both in clean fresh install of 9.3.2 without plugins on test server and after upgrade production server (9.2.1) with thousands of db items
GLPI 9.3.2 ( => /var/www/glpi)
Installation mode: TARBALL
Server
Operating system: Linux debian 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64
PHP 7.2.11-2+0~20181015120801.9+stretch~1.gbp8105e0 apache2handler (Core, PDO, PDO_ODBC, Phar, Reflection, SPL, SimpleXML, Zend
OPcache, apache2handler, apc, apcu, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv,
imap, json, ldap, libxml, mbstring, mysqli, mysqlnd, odbc, openssl, pcre, pdo_mysql, posix, readline, session, shmop, soap,
sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zlib)
Setup: max_execution_time="60" memory_limit="256M" post_max_size="12M" safe_mode="" session.save_handler="files"
upload_max_filesize="10M"
Software: Apache/2.4.25 (Debian) (Apache/2.4.25 (Debian) Server at 192.168.31.202 Port 80)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Server Software: mariadb.org binary distribution
Server Version: 10.3.10-MariaDB-1:10.3.10+maria~stretch-log
Server SQL Mode:
Parameters: glpi@localhost/glpi
Host info: Localhost via UNIX socket
mysqli extension is installed
ctype extension is installed
fileinfo extension is installed
json extension is installed
mbstring extension is installed
zlib extension is installed
curl extension is installed
gd extension is installed
simplexml extension is installed
xml extension is installed
ldap extension is installed
imap extension is installed
Zend OPcache extension is installed
APCu extension is installed
xmlrpc extension is installed
CAS extension is not present
Database version seems correct (10.3.10) - Perfect!Database version seems correct (10.3.10) - Perfect!
OK/var/www/glpi/files/_log : OK
OK/var/www/glpi/config : OK
OK/var/www/glpi/files : OK
OK/var/www/glpi/files/_dumps : OK
OK/var/www/glpi/files/_sessions : OK
OK/var/www/glpi/files/_cron : OK
OK/var/www/glpi/files/_graphs : OK
OK/var/www/glpi/files/_lock : OK
OK/var/www/glpi/files/_plugins : OK
OK/var/www/glpi/files/_tmp : OK
OK/var/www/glpi/files/_cache : OK
OK/var/www/glpi/files/_rss : OK
OK/var/www/glpi/files/_uploads : OK
OK/var/www/glpi/files/_pictures : OK
Web access to files directory is protectedWeb access to files directory is protected : OK
Libraries
htmLawed version 1.2.4 in (/var/www/glpi/lib/htmlawed)
SimplePie version 1.5.2 in (/var/www/glpi/vendor/simplepie/simplepie/library)
TCPDF version 6.2.25 in (/var/www/glpi/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/var/www/glpi/vendor/michelf/php-markdown/Michelf)
true/punycode in (/var/www/glpi/vendor/true/punycode/src)
iacaml/autolink in (/var/www/glpi/vendor/iamcal/lib_autolink)
sabre/vobject in (/var/www/glpi/vendor/sabre/vobject/lib)
SQL replicas
Not active
Notifications
Way of sending emails: PHP
Mails receivers
Plugins list
Offline
You made this request from search engine in GLPI?
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
You made this request from search engine in GLPI?
Yes, default search form
I done more testing with different php and glpi versions and found that this bug is not present in glpi 9.3.1
Last edited by spirkaa (2018-10-29 15:34:18)
Offline
can you look at your database if glpi_locations is not crashed?
If it is, repair it.
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
The problem is with not only locations, but another search items too. They work fine on Root entity (tree structure). There's nothing to do with database repair, because it is a clean, fresh install of 9.3.2 with only 1-2 test locations and 15 entinties.
And no problem at all with version 9.3.1.
Last edited by spirkaa (2018-10-30 09:25:19)
Offline
Ticket opened on the glpi forge: https://github.com/glpi-project/glpi/issues/4859
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Same error when i try to assign Users to Groups
PHP Fatal error: Uncaught Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheInvalidArgumentException: Invalid key "glpi_entities_ancestors_cache_0
Offline
Same error when i try to assign Users to Groups
PHP Fatal error: Uncaught Zend\\Cache\\Psr\\SimpleCache\\SimpleCacheInvalidArgumentException: Invalid key "glpi_entities_ancestors_cache_0
fix with diff file but the query is VERY SLOW ....
Offline
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline