From 82f61cc40ac0694f8927b1a9356eb98b1fafa5de Mon Sep 17 00:00:00 2001 From: Chris Reed <55092742+cjreed121@users.noreply.github.com> Date: Sun, 1 Feb 2026 13:48:07 -0500 Subject: [PATCH] Bump PHP 8.2 --- .../coding_style_guide/php.md | 2 +- _docs/developer/testing/install_php.md | 14 ++++++++++--- .../sysadmin/configuration/course_creation.md | 4 ++-- _docs/sysadmin/installation/index.md | 2 +- .../installation/system_customization.md | 20 +++++++++---------- .../installation/version_notes/v26.01.00.md | 18 +++++++++++++++++ navtreedata.js | 1 + 7 files changed, 44 insertions(+), 17 deletions(-) create mode 100644 _docs/sysadmin/installation/version_notes/v26.01.00.md diff --git a/_docs/developer/software_and_system_design/coding_style_guide/php.md b/_docs/developer/software_and_system_design/coding_style_guide/php.md index be8744eb..dfe21069 100644 --- a/_docs/developer/software_and_system_design/coding_style_guide/php.md +++ b/_docs/developer/software_and_system_design/coding_style_guide/php.md @@ -5,7 +5,7 @@ redirect_from: - /developer/coding_style_guide/php --- -__Minimum Version__: 8.1 +__Minimum Version__: 8.2 For PHP, we use a foundation of [PSR-1](https://www.php-fig.org/psr/psr-1/) and [PSR-12](https://www.php-fig.org/psr/psr-12/), with some slight modifications on diff --git a/_docs/developer/testing/install_php.md b/_docs/developer/testing/install_php.md index a182da6d..c8b14038 100644 --- a/_docs/developer/testing/install_php.md +++ b/_docs/developer/testing/install_php.md @@ -8,12 +8,20 @@ you will need to have PHP installed on your host machine first. ### Linux & WSL: -*If you're distro cannot find the correct package or installs the wrong version you may have to specify php8.1 in each package name* +*If you're distro cannot find the correct package or installs the wrong version you may have to specify php8.2 in each package name* ```bash sudo apt-get update sudo apt-get install -y php php-curl php-xml php-mbstring ``` + +*You may need to install the PHP PPA for certain versions of PHP* + +```bash +sudo add-apt-repository ppa:ondrej/php +sudo apt update +``` + ### MacOS ```bash @@ -25,11 +33,11 @@ default. ### Windows -Download [php 8.1](https://windows.php.net/download/) as a zip file under the thread safe category. Then extract the contents of the zip to a folder, and add the path to that folder to your path system variable. It's suggested that one extracts the contents of the zip to a folder called `php`, which can be put at `C:\php` for simplicity. You can then add `C:\php` to your path system environment variable. +Download [php 8.2](https://windows.php.net/download/) as a zip file under the thread safe category. Then extract the contents of the zip to a folder, and add the path to that folder to your path system variable. It's suggested that one extracts the contents of the zip to a folder called `php`, which can be put at `C:\php` for simplicity. You can then add `C:\php` to your path system environment variable. ------------- -Verify you have PHP installed correctly, submitty requires a version greater than 7.0 +Verify you have PHP installed correctly, submitty requires at least version 8.2 ```bash php -v diff --git a/_docs/sysadmin/configuration/course_creation.md b/_docs/sysadmin/configuration/course_creation.md index a092ef3d..60dbb97f 100644 --- a/_docs/sysadmin/configuration/course_creation.md +++ b/_docs/sysadmin/configuration/course_creation.md @@ -60,7 +60,7 @@ you can follow these [instructions](ansible_course_creation) to create a course need to restart fpm to ensure that the webpage sees the change:_ ``` - sudo service php8.1-fpm restart + sudo service php8.2-fpm restart ``` _Note: Depending on your version of Ubuntu, your version of php fpm will be different._ @@ -122,7 +122,7 @@ you can follow these [instructions](ansible_course_creation) to create a course _Note: You will sometimes need to restart PHP-FPM after adding a course._ ``` - sudo service php8.1-fpm restart + sudo service php8.2-fpm restart ``` diff --git a/_docs/sysadmin/installation/index.md b/_docs/sysadmin/installation/index.md index b8c5c991..1b06a7b2 100644 --- a/_docs/sysadmin/installation/index.md +++ b/_docs/sysadmin/installation/index.md @@ -75,7 +75,7 @@ You can use these [instructions](/sysadmin/installation/ansible). 4. Edit PHP Settings We recommend for security that you modify your PHP installation and disable certain PHP functions. - To do this, edit `/etc/php/8.1/fpm/php.ini` and find the entry for `disable_functions` and make sure the list of + To do this, edit `/etc/php/8.2/fpm/php.ini` and find the entry for `disable_functions` and make sure the list of disabled functions contains: ``` diff --git a/_docs/sysadmin/installation/system_customization.md b/_docs/sysadmin/installation/system_customization.md index e6a1db80..24bd9582 100644 --- a/_docs/sysadmin/installation/system_customization.md +++ b/_docs/sysadmin/installation/system_customization.md @@ -162,7 +162,7 @@ By default, PHP only allows 20 files to be uploaded at a time. This limit is probably sufficient, but to change this limit, edit: ``` -/etc/php/8.1/fpm/php.ini +/etc/php/8.2/fpm/php.ini ``` and modify the variable: @@ -174,7 +174,7 @@ max_file_uploads = 20 Then restart PHP ``` -systemctl reload php8.1-fpm +systemctl reload php8.2-fpm ``` ## Allowing Large Student File Upload Submissions @@ -187,7 +187,7 @@ value, view/edit this file: ``` -/etc/php/8.1/fpm/php.ini +/etc/php/8.2/fpm/php.ini ``` _Note: Depending on your version of Ubuntu, your version of php fpm will be different._ @@ -207,14 +207,14 @@ And restart apache: ``` sudo systemctl restart apache2.service -sudo systemctl restart php8.1-fpm.service +sudo systemctl restart php8.2-fpm.service ``` and/or ``` sudo service apache2 restart -sudo service php8.1-fpm restart +sudo service php8.2-fpm restart ``` _Note: Depending on your version of Ubuntu, your version of php fpm will be different._ @@ -229,7 +229,7 @@ in the `config.json`, for example: ``` If you are having difficulty with student upload size, you can modify the -following in `/etc/php/8.1/fpm/php.ini`: +following in `/etc/php/8.2/fpm/php.ini`: ``` memory_limit @@ -245,7 +245,7 @@ students are using the system at once. ## Tune the performance of the website to handle a large number of users -Reading the PHP memory limit from `/etc/php/8.1/fpm/php.ini` +Reading the PHP memory limit from `/etc/php/8.2/fpm/php.ini` ``` memory_limit = @@ -262,14 +262,14 @@ restart apache and php-fpm: ``` sudo systemctl restart apache2.service -sudo systemctl restart php8.1-fpm.service +sudo systemctl restart php8.2-fpm.service ``` #### PHP-FPM settings using the static process manager -Adjust the following settings in `/etc/php/8.1/fpm/pool.d/submitty.conf`. +Adjust the following settings in `/etc/php/8.2/fpm/pool.d/submitty.conf`. We have found that the following settings work well for a production server with approximately 2000 students. The commented out line is @@ -292,7 +292,7 @@ can be used to calculate a `pm.max_children` value for your server #### PHP-FPM settings using the dynamic process manager -Adjust the following settings in `/etc/php/8.1/fpm/pool.d/submitty.conf`. +Adjust the following settings in `/etc/php/8.2/fpm/pool.d/submitty.conf`. The commented out line is the default value. Please read the documentation to determine values that are appropriate for your own system. diff --git a/_docs/sysadmin/installation/version_notes/v26.01.00.md b/_docs/sysadmin/installation/version_notes/v26.01.00.md new file mode 100644 index 00000000..f8783903 --- /dev/null +++ b/_docs/sysadmin/installation/version_notes/v26.01.00.md @@ -0,0 +1,18 @@ +--- +title: v26.01.00 > Upgrading to PHP 8.2 +category: System Administrator > Installation Version Notes +--- + +Release [v26.01.00](https://github.com/Submitty/Submitty/releases/v26.01.00) +includes an update to PHP from 8.1 to 8.2. + +A migration exists which will do the following: +1. Uninstall PHP 8.1 +2. Install PHP 8.2 +3. Configure PHP 8.2's `php.ini` file for a normal system installation +4. Copy `submitty.conf` from `/etc/php/8.1/fpm/pool.d` to `/etc/php/8.2/fpm/pool.d` + +`/etc/php/8.1` is not deleted or modified in any way during this process. + +Ensure any custom configuration from `/etc/php/8.1` is copied over to `/etc/php/8.2`. +Once complete, `/etc/php/8.1` can be deleted. diff --git a/navtreedata.js b/navtreedata.js index d6488aea..0a9f17d0 100644 --- a/navtreedata.js +++ b/navtreedata.js @@ -156,6 +156,7 @@ var NAVTREE = [ "Ansible Server Installation", "/sysadmin/installation/ansible", null ], [ "Version Notes", "/sysadmin/installation/version_notes/index", [ [ "Overview", "/sysadmin/installation/version_notes/index", null], + [ "v26.01.00", "/sysadmin/installation/version_notes/v26.01.00", null ], [ "v25.07.01", "/sysadmin/installation/version_notes/v25.07.01", null ], [ "v23.12.02", "/sysadmin/installation/version_notes/v23.12.02", null ], [ "v23.07.00", "/sysadmin/installation/version_notes/v23.07.00", null ],