Cant upload pictures over 2mb #4291

Closed
opened 2026-02-05 08:26:55 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @D4ve21 on GitHub (Nov 2, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hi Everyone,

i cant upload large Files in my Bookstack instance.

I updated the php.ini file in /etc/php/8.1/apache2 as well as the .htaccess file in /var/www/bookstack/public also in /var/www/bookstack/public/uploads. I'll attach the changes made in those files.

After restarting the apache server I still get an Error Message when uploading files over 2mb.

Did i forget any changes or does anyone have an idea what the issue could be?

Thanks in regards
htaccess public
htaccess public:uploads
php

Exact BookStack Version

v23.08.3

Log Content

No response

Hosting Environment

PHP8.1 on Ubuntu 22.04 installed via installation script

Originally created by @D4ve21 on GitHub (Nov 2, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hi Everyone, i cant upload large Files in my Bookstack instance. I updated the php.ini file in /etc/php/8.1/apache2 as well as the .htaccess file in /var/www/bookstack/public also in /var/www/bookstack/public/uploads. I'll attach the changes made in those files. After restarting the apache server I still get an Error Message when uploading files over 2mb. Did i forget any changes or does anyone have an idea what the issue could be? Thanks in regards <img width="276" alt="htaccess public" src="https://github.com/BookStackApp/BookStack/assets/131771980/5d60b72a-346b-4833-ba64-2db60cd7e9ad"> <img width="278" alt="htaccess public:uploads" src="https://github.com/BookStackApp/BookStack/assets/131771980/1aab91e2-e35d-422f-8057-e359eae666f9"> <img width="494" alt="php" src="https://github.com/BookStackApp/BookStack/assets/131771980/4178e227-ac4f-4578-90ca-4bd9d7e8cc2c"> ### Exact BookStack Version v23.08.3 ### Log Content _No response_ ### Hosting Environment PHP8.1 on Ubuntu 22.04 installed via installation script
OVERLORD added the 🐕 Support label 2026-02-05 08:26:55 +03:00
Author
Owner

@D4ve21 commented on GitHub (Nov 2, 2023):

Forgot to add that I also changed the .env file with the necessary options from the documentaion

@D4ve21 commented on GitHub (Nov 2, 2023): Forgot to add that I also changed the .env file with the necessary options from the documentaion
Author
Owner

@ssddanbrown commented on GitHub (Nov 2, 2023):

Hi @D4ve21,
You should only have to alter your /etc/php/8.1/apache2/php.ini file and the BookStack .env, no other webserver config.
(I'd remove any additional changes you've made upon these to prevent confusion and overlap).

Make sure you have also changed the post_max_size option in this file.
Both options should already exist, you shouldn't have needed to add the options to these.

From your screenshot, it looks like you've altered max_file_uploads in a manner which does not look correct. Set the value back to 20 instead of 20M. This is a count, not a filesize.

Remember to restart apache after these changes (sudo systemctl restart apache2.service).

@ssddanbrown commented on GitHub (Nov 2, 2023): Hi @D4ve21, You should only have to alter your `/etc/php/8.1/apache2/php.ini` file and the BookStack `.env`, no other webserver config. (I'd remove any additional changes you've made upon these to prevent confusion and overlap). Make sure you have also changed the `post_max_size` option in this file. Both options should already exist, you shouldn't have needed to add the options to these. From your screenshot, it looks like you've altered `max_file_uploads` in a manner which does not look correct. Set the value back to `20` instead of `20M`. This is a count, not a filesize. Remember to restart apache after these changes (`sudo systemctl restart apache2.service`).
Author
Owner

@D4ve21 commented on GitHub (Nov 2, 2023):

Thanks for the fast reply!

I reversed the changes so only the .env and php file is altered but the issue sadly remains.

@D4ve21 commented on GitHub (Nov 2, 2023): Thanks for the fast reply! I reversed the changes so only the .env and php file is altered but the issue sadly remains.
Author
Owner

@ssddanbrown commented on GitHub (Nov 2, 2023):

@D4ve21 Did you also fix/alter the /etc/php/8.1/apache2/php.ini file as per my comments?

@ssddanbrown commented on GitHub (Nov 2, 2023): @D4ve21 Did you also fix/alter the `/etc/php/8.1/apache2/php.ini` file as per my comments?
Author
Owner

@D4ve21 commented on GitHub (Nov 2, 2023):

@ssddanbrown i checked again and my ftp client didnt save the changes to the file. did it now with the terminal and it works. thank you for the fast help :)

@D4ve21 commented on GitHub (Nov 2, 2023): @ssddanbrown i checked again and my ftp client didnt save the changes to the file. did it now with the terminal and it works. thank you for the fast help :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4291