glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.3k stars 1.29k forks source link

Lost pics with 10.0.5 update #13196

Closed troublestarter closed 2 years ago

troublestarter commented 2 years ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.5

Bug description

Since update in 10.0.5 we lost pictures on profiles

image

Relevant log output

No response

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

GLPI 10.0.5 ( => /usr/share/glpi) Installation mode: TARBALL Current language:fr_FR

Anything else?

No response

trasher commented 2 years ago

Please make sure you copy your old data directory into your new instance.

troublestarter commented 2 years ago

Seems yes : cp -rv /usr/share/glpibak1004/files/* /usr/share/glpi/files/

troublestarter commented 2 years ago

root@support:/usr/share# diff -qr /usr/share/glpi/files/ /usr/share/glpibak1004/ Only in /usr/share/glpi/files/: 7Z Only in /usr/share/glpibak1004/: ajax Only in /usr/share/glpibak1004/: apirest.md Only in /usr/share/glpibak1004/: apirest.php Only in /usr/share/glpibak1004/: apixmlrpc.php Only in /usr/share/glpibak1004/: babel.config.js Only in /usr/share/glpibak1004/: bin Only in /usr/share/glpi/files/: BMP Only in /usr/share/glpi/files/: _cache Only in /usr/share/glpibak1004/: caldav.php Only in /usr/share/glpibak1004/: CHANGELOG.md Only in /usr/share/glpibak1004/: config Only in /usr/share/glpibak1004/: CONTRIBUTING.md Only in /usr/share/glpi/files/: _cron Only in /usr/share/glpibak1004/: css Only in /usr/share/glpibak1004/: css_compiled Only in /usr/share/glpi/files/: CSV Only in /usr/share/glpi/files/: DOC Only in /usr/share/glpi/files/: DOCX Only in /usr/share/glpi/files/: _dumps Only in /usr/share/glpibak1004/: files Only in /usr/share/glpibak1004/: front Only in /usr/share/glpi/files/: _graphs Files /usr/share/glpi/files/.htaccess and /usr/share/glpibak1004/.htaccess differ Only in /usr/share/glpi/files/: HTML Only in /usr/share/glpibak1004/: inc Only in /usr/share/glpibak1004/: index.php Only in /usr/share/glpibak1004/: install Only in /usr/share/glpibak1004/: INSTALL.md Only in /usr/share/glpi/files/: _inventories Only in /usr/share/glpi/files/: JPEG Only in /usr/share/glpi/files/: JPG Only in /usr/share/glpibak1004/: js Only in /usr/share/glpibak1004/: lib Only in /usr/share/glpibak1004/: LICENSE Only in /usr/share/glpi/files/: _locales Only in /usr/share/glpibak1004/: locales Only in /usr/share/glpi/files/: _lock Only in /usr/share/glpi/files/: _log Only in /usr/share/glpibak1004/: marketplace Only in /usr/share/glpibak1004/: pics Only in /usr/share/glpi/files/: _pictures Only in /usr/share/glpi/files/: _plugins Only in /usr/share/glpibak1004/: plugins Only in /usr/share/glpibak1004/: public Only in /usr/share/glpibak1004/: README.md Only in /usr/share/glpi/files/: _rss Only in /usr/share/glpibak1004/: SECURITY.md Only in /usr/share/glpi/files/: _sessions Only in /usr/share/glpibak1004/: sound Only in /usr/share/glpibak1004/: src Only in /usr/share/glpibak1004/: status.php Only in /usr/share/glpibak1004/: SUPPORT.md Only in /usr/share/glpibak1004/: templates Only in /usr/share/glpi/files/: _tmp Only in /usr/share/glpi/files/: TXT Only in /usr/share/glpi/files/: _uploads Only in /usr/share/glpibak1004/: vendor Only in /usr/share/glpibak1004/: .version Only in /usr/share/glpi/files/: WAV Only in /usr/share/glpi/files/: XLS Only in /usr/share/glpi/files/: XLSX Only in /usr/share/glpi/files/: ZIP

trasher commented 2 years ago

Check GLPI logs and browser messages.

cedric-anne commented 2 years ago

Also, please provide full details in Your GLPI setup information. It may contains usefull information to see if your directories are correctly mapped.

troublestarter commented 2 years ago

same issue with screenshot in tickets

troublestarter commented 2 years ago

Operating system: Linux support 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 PHP 8.1.12 fpm-fcgi (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, soap, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib) Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files" upload_max_filesize="2M" Software: Apache/2.4.54 (Debian) (Apache/2.4.54 (Debian) Server at support.my-cosi.info Port 80 ) Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26 Server Software: Debian 11 Server Version: 10.5.15-MariaDB-0+deb11u1 Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION Parameters: root@localhost/glpi Host info: Localhost via UNIX socket

PHP version (8.1.12) is supported.PHP version (8.1.12) is supported. Sessions configuration is OK.Sessions configuration is OK. Allocated memory is sufficient.Allocated memory is sufficient. mysqli extension is installed.mysqli extension is installed. Following extensions are installed: dom, fileinfo, json, simplexml.Following extensions are installed: dom, fileinfo, json, simplexml. curl extension is installed.curl extension is installed. gd extension is installed.gd extension is installed. intl extension is installed.intl extension is installed. libxml extension is installed.libxml extension is installed. zlib extension is installed.zlib extension is installed. The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present. Database engine version (10.5.15) is supported.Database engine version (10.5.15) is supported. No files from previous GLPI version detected.No files from previous GLPI version detected. The log file has been created successfully.The log file has been created successfully. Write access to /usr/share/glpi/files/_cache has been validated. Write access to /usr/share/glpi/config has been validated. Write access to /usr/share/glpi/files/_cron has been validated. Write access to /usr/share/glpi/files has been validated. Write access to /usr/share/glpi/files/_dumps has been validated. Write access to /usr/share/glpi/files/_graphs has been validated. Write access to /usr/share/glpi/files/_lock has been validated. Write access to /usr/share/glpi/files/_pictures has been validated. Write access to /usr/share/glpi/files/_plugins has been validated. Write access to /usr/share/glpi/files/_rss has been validated. Write access to /usr/share/glpi/files/_sessions has been validated. Write access to /usr/share/glpi/files/_tmp has been validated. Write access to /usr/share/glpi/files/_uploads has been validated.Write access to /usr/share/glpi/files/_cache has been validated. Write access to /usr/share/glpi/config has been validated. Write access to /usr/share/glpi/files/_cron has been validated. Write access to /usr/share/glpi/files has been validated. Write access to /usr/share/glpi/files/_dumps has been validated. Write access to /usr/share/glpi/files/_graphs has been validated. Write access to /usr/share/glpi/files/_lock has been validated. Write access to /usr/share/glpi/files/_pictures has been validated. Write access to /usr/share/glpi/files/_plugins has been validated. Write access to /usr/share/glpi/files/_rss has been validated. Write access to /usr/share/glpi/files/_sessions has been validated. Write access to /usr/share/glpi/files/_tmp has been validated. Write access to /usr/share/glpi/files/_uploads has been validated. The following directories should be placed outside "/usr/share/glpi": ‣ "/usr/share/glpi/files" ("GLPI_VAR_DIR") ‣ "/usr/share/glpi/config" ("GLPI_CONFIG_DIR") You can ignore this suggestion if you are certain that these directories are not accessible through your web server.The following directories should be placed outside "/usr/share/glpi": ‣ "/usr/share/glpi/files" ("GLPI_VAR_DIR") ‣ "/usr/share/glpi/config" ("GLPI_CONFIG_DIR") You can ignore this suggestion if you are certain that these directories are not accessible through your web server. Sessions configuration is secured.Sessions configuration is secured. exif extension is installed.exif extension is installed. ldap extension is installed.ldap extension is installed. openssl extension is installed.openssl extension is installed. zip extension is installed.zip extension is installed. bz2 extension is installed.bz2 extension is installed. Zend OPcache extension is installed.Zend OPcache extension is installed. Following extensions are installed: ctype, iconv, mbstring, sodium.Following extensions are installed: ctype, iconv, mbstring, sodium. Write access to /usr/share/glpi/marketplace has been validated.Write access to /usr/share/glpi/marketplace has been validated. Timezones seems loaded in database.Timezones seems loaded in database.

troublestarter commented 2 years ago

GLPI_ROOT: "/usr/share/glpi" GLPI_CONFIG_DIR: "/usr/share/glpi/config" GLPI_VAR_DIR: "/usr/share/glpi/files" GLPI_MARKETPLACE_DIR: "/usr/share/glpi/marketplace" GLPI_USE_CSRF_CHECK: "1" GLPI_CSRF_EXPIRES: "7200" GLPI_CSRF_MAX_TOKENS: "100" GLPI_USE_IDOR_CHECK: "1" GLPI_IDOR_EXPIRES: "7200" GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false GLPI_SERVERSIDE_URL_ALLOWLIST: ["/^(https?|feed):\/\/[^@:]+(\/.*)?$/"] GLPI_TELEMETRY_URI: "https://telemetry.glpi-project.org" GLPI_INSTALL_MODE: "TARBALL" GLPI_NETWORK_MAIL: "glpi@teclib.com" GLPI_NETWORK_SERVICES: "https://services.glpi-network.com" GLPI_MARKETPLACE_ALLOW_OVERRIDE: true GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true GLPI_USER_AGENT_EXTRA_COMMENTS: "" GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: "1" GLPI_AJAX_DASHBOARD: "1" GLPI_CALDAV_IMPORT_STATE: 0 GLPI_DEMO_MODE: "0" GLPI_CENTRAL_WARNINGS: "1" GLPI_DOC_DIR: "/usr/share/glpi/files" GLPI_CACHE_DIR: "/usr/share/glpi/files/_cache" GLPI_CRON_DIR: "/usr/share/glpi/files/_cron" GLPI_DUMP_DIR: "/usr/share/glpi/files/_dumps" GLPI_GRAPH_DIR: "/usr/share/glpi/files/_graphs" GLPI_LOCAL_I18N_DIR: "/usr/share/glpi/files/_locales" GLPI_LOCK_DIR: "/usr/share/glpi/files/_lock" GLPI_LOG_DIR: "/usr/share/glpi/files/_log" GLPI_PICTURE_DIR: "/usr/share/glpi/files/_pictures" GLPI_PLUGIN_DOC_DIR: "/usr/share/glpi/files/_plugins" GLPI_RSS_DIR: "/usr/share/glpi/files/_rss" GLPI_SESSION_DIR: "/usr/share/glpi/files/_sessions" GLPI_TMP_DIR: "/usr/share/glpi/files/_tmp" GLPI_UPLOAD_DIR: "/usr/share/glpi/files/_uploads" GLPI_INVENTORY_DIR: "/usr/share/glpi/files/_inventories" GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/" GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/glpi-plugins/" GLPI_I18N_DIR: "/usr/share/glpi/locales" GLPI_VERSION: "10.0.5" GLPI_SCHEMA_VERSION: "10.0.5@628dbfbb91eb4caf10c35969d9162b9300b141e0" GLPI_MARKETPLACE_PRERELEASES: false GLPI_MIN_PHP: "7.4.0" GLPI_MAX_PHP: "8.3.0" GLPI_YEAR: "2022"

cedric-anne commented 2 years ago

Does the webserver user has rights to access these files ?

troublestarter commented 2 years ago

Also received this

PHP Warning: getimagesize(/usr/share/glpi/files/PNG/f0/c1bcc52d7a8de7f6490bffcb16284ab9e5490f.PNG): Failed to open stream: No such file or directory in /usr/share/glpi/src/NotificationEventMailing.php on line 283 PHP Warning: Trying to access array offset on value of type bool in /usr/share/glpi/src/NotificationEventMailing.php on line 284 PHP Warning: Trying to access array offset on value of type bool in /usr/share/glpi/src/NotificationEventMailing.php on line 285 Uncaught Exception DivisionByZeroError: Division by zero in /usr/share/glpi/src/NotificationEventMailing.php at line 289

troublestarter commented 2 years ago

Does the webserver user has rights to access these files ?

Passed this in upgrade process chown root:www-data /usr/share/glpi -R chmod 775 /usr/share/glpi -R

troublestarter commented 2 years ago

i have copied again the files folder. seems ok now. There might be a strange things in the process.

Sorry.