Skip to content

Commit 2f45ae4

Browse files
authored
Fixed wrong PHP values to match default part-db size (100M) (#3143)
* Fixed wrong PHP values to match default part-db size (100M) The default Uploadsize is 100M but PHP is limited to 2M (Upload) and 8M (Post) by default, this commit fixed that. * Getting current used php-version
1 parent 409f86c commit 2f45ae4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

install/part-db-install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ $STD apt-get install -y \
2929
postgresql
3030
msg_ok "Installed Dependencies"
3131

32+
msg_info "Setting up PHP"
33+
PHPVER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "\n";')
34+
sed -i "s@post_max_size = 8M@post_max_size = 100M@g" /etc/php/${PHPVER}/apache2/php.ini
35+
sed -i "s@upload_max_filesize = 2M@upload_max_filesize = 100M@g" /etc/php/${PHPVER}/apache2/php.ini
36+
msg_ok "Setting up PHP"
37+
3238
msg_info "Setting up PostgreSQL"
3339
DB_NAME=partdb
3440
DB_USER=partdb

0 commit comments

Comments
 (0)