Unable to attach a 4M file to a page #5501

Closed
opened 2026-02-05 10:07:08 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @mtzero897 on GitHub (Nov 16, 2025).

Describe the Bug

Similar to issue #5529 , I am unable to upload a 3,810 KB pdf as an attachment to a page.
Error:

Image

Bookstack version v25.11.1

New install on new Ubuntu 24.04.3 VM (fresh OS) on Proxmox following the Ubuntu 24.04 Installation Script: https://www.bookstackapp.com/docs/admin/installation/#ubuntu-2404

PHP 8.3.6 (cli)

I followed the guide:
https://www.bookstackapp.com/docs/admin/upload-config/#changing-upload-limits

And added to Bookstack .env
FILE_UPLOAD_SIZE_LIMIT=50

And changed the following in php.ini:
post_max_size = 50M
upload_max_filesize = 50M
memory_limit = 256M

nginx is not installed

Steps to Reproduce

  1. edit a page
  2. click the attachment button on the right hand side
  3. click "Upload File"
  4. Select the pdf file (3,810KB)
  5. Error pop-up "The file could not be uploaded. The server may not accept files of this size.

Expected Behaviour

File would be uploaded / attached

Screenshots or Additional Context

Image

Browser Details

Firefox 144.0.2 (64-bit)

Exact BookStack Version

BookStack v25.11.1

Originally created by @mtzero897 on GitHub (Nov 16, 2025). ### Describe the Bug Similar to issue #5529 , I am unable to upload a 3,810 KB pdf as an attachment to a page. Error: <img width="242" height="75" alt="Image" src="https://github.com/user-attachments/assets/c1fc4498-1008-43fc-9932-1edb7e7e0eae" /> Bookstack version v25.11.1 New install on new Ubuntu 24.04.3 VM (fresh OS) on Proxmox following the Ubuntu 24.04 Installation Script: https://www.bookstackapp.com/docs/admin/installation/#ubuntu-2404 PHP 8.3.6 (cli) I followed the guide: https://www.bookstackapp.com/docs/admin/upload-config/#changing-upload-limits And added to Bookstack .env FILE_UPLOAD_SIZE_LIMIT=50 And changed the following in php.ini: post_max_size = 50M upload_max_filesize = 50M memory_limit = 256M nginx is not installed ### Steps to Reproduce 1. edit a page 2. click the attachment button on the right hand side 3. click "Upload File" 4. Select the pdf file (3,810KB) 5. Error pop-up "The file could not be uploaded. The server may not accept files of this size. ### Expected Behaviour File would be uploaded / attached ### Screenshots or Additional Context <img width="242" height="75" alt="Image" src="https://github.com/user-attachments/assets/f8905511-236a-4d27-82d7-edf214e1e7b4" /> ### Browser Details Firefox 144.0.2 (64-bit) ### Exact BookStack Version BookStack v25.11.1
OVERLORD added the 🐕 Support label 2026-02-05 10:07:08 +03:00
Author
Owner

@wowagsm commented on GitHub (Nov 17, 2025):

If you installed it from a script https://codeberg.org/bookstack/devops/raw/branch/main/scripts/installation-ubuntu-24.04.sh, then most likely your php is processing php-fpm. To apply the php.ini settings in the application, you need to restart the php-fpm service (systemctl restart php8.3-fpm.service)

@wowagsm commented on GitHub (Nov 17, 2025): If you installed it from a script **https://codeberg.org/bookstack/devops/raw/branch/main/scripts/installation-ubuntu-24.04.sh**, then most likely your php is processing php-fpm. To apply the **php.ini** settings in the application, you need to restart the php-fpm service (**systemctl restart php8.3-fpm.service**)
Author
Owner

@ssddanbrown commented on GitHub (Nov 17, 2025):

Another factor to check is that you're editing the correct php.ini file since there may be multiple.
Following the above, where fpm is used you'd need to alter the fpm config, which would typically be located somewhere at /etc/php/8.3/fpm/php.ini on a PHP 8.3 based install using FPM.

@ssddanbrown commented on GitHub (Nov 17, 2025): Another factor to check is that you're editing the correct `php.ini` file since there may be multiple. Following the above, where fpm is used you'd need to alter the fpm config, which would typically be located somewhere at `/etc/php/8.3/fpm/php.ini` on a PHP 8.3 based install using FPM.
Author
Owner

@mtzero897 commented on GitHub (Nov 18, 2025):

Thank you! I originally changed /etc/php/8.3/cli/php.ini, not the php.ini file in the fpm directory /etc/php.8.3/fpm/php.ini

After changing /etc/php/8.3/fpm/php.ini and restarting the php-fpm service, I can now upload larger size files.

Thank you again @wowagsm and @ssddanbrown , you’re awesome and so is BookStack!

@mtzero897 commented on GitHub (Nov 18, 2025): Thank you! I originally changed `/etc/php/8.3/cli/php.ini,` not the php.ini file in the fpm directory `/etc/php.8.3/fpm/php.ini` After changing `/etc/php/8.3/fpm/php.ini` and restarting the php-fpm service, I can now upload larger size files. Thank you again @wowagsm and @ssddanbrown , you’re awesome and so is BookStack!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5501