GLPI maximum upload filesize

GLPI maximum upload filesize

Users hit "the file is too big" when attaching screenshots, invoices, or inventory exports to tickets. Like any PHP application, GLPI inherits PHP's default upload limit — typically 2 MB. There are three places that can block a larger upload: PHP itself, the web server in front of PHP, and GLPI's own per-entity limit. All three need to agree.

1. PHP limits

The relevant directives live in php.ini:

  • upload_max_filesize — maximum size of a single uploaded file
  • post_max_size — maximum size of the whole POST request (must be ≥ upload_max_filesize)
  • memory_limit — peak memory for the PHP process (should be ≥ post_max_size)
  • max_execution_time — seconds before the script is killed; bump it for large uploads on slow links
  • max_input_time — seconds PHP will wait for request data to arrive

Find the right php.ini — there are usually several, and editing the wrong one does nothing:

php --ini
# or from GLPI itself: Setup → General → System → check "Loaded Configuration File"

On modern systems the CLI and web ini files are separate. For the web, you want something like:

  • Debian/Ubuntu (Apache + mod_php): /etc/php/8.2/apache2/php.ini
  • Debian/Ubuntu (nginx + PHP-FPM): /etc/php/8.2/fpm/php.ini
  • RHEL/CentOS: /etc/php.ini

Example values for a 100 MB upload:

upload_max_filesize = 100M
post_max_size = 110M
memory_limit = 256M
max_execution_time = 300
max_input_time = 300

2. Reload PHP

Changes to php.ini don't take effect until the PHP process is reloaded. Which service depends on your stack:

# Apache with mod_php
sudo systemctl reload apache2          # Debian/Ubuntu
sudo systemctl reload httpd            # RHEL/CentOS

# nginx with PHP-FPM
sudo systemctl reload php8.2-fpm       # Debian/Ubuntu
sudo systemctl reload php-fpm          # RHEL/CentOS

The old /etc/init.d/httpd restart command still works on legacy systems but systemd is the standard since ~2015.

3. Web server limits

If PHP is behind nginx, nginx enforces its own upload cap (default 1 MB). Raise it in the server block or globally:

client_max_body_size 110M;

Then reload nginx: sudo systemctl reload nginx. Apache doesn't have an equivalent hard cap for mod_php, but if you use LimitRequestBody in your config, raise that too.

If you sit behind Cloudflare or another CDN, check its upload limit as well — Cloudflare Free caps at 100 MB per request, Pro at 200 MB, Business at 500 MB. A bigger PHP limit can't get past a smaller CDN limit.

4. GLPI per-entity limit

GLPI has its own "Maximum size for documents" setting, configured per entity:

  1. Administration → Entities → pick the entity → Assistance tab
  2. Set Maximum size of uploaded documents (in MB)

This is separate from the PHP and web server limits — GLPI will reject files above this value even if PHP would have accepted them. Set it to whatever your PHP configuration actually allows, minus a small buffer for request overhead.

5. Verify

Upload a file close to your new limit through the GLPI UI. If it still fails, check the response size and which layer complained:

  • "413 Request Entity Too Large" — nginx or Apache (web server limit)
  • "POST Content-Length exceeds the limit" — PHP post_max_size
  • "The file exceeds the maximum size" — PHP upload_max_filesize
  • "The file size is too high" inside GLPI — the per-entity GLPI limit

The error message tells you which of the four layers to fix next.

Need help with this topic?

Get in touch