Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions _docs/developer/testing/install_php.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions _docs/sysadmin/configuration/course_creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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._
Expand Down Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion _docs/sysadmin/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down
20 changes: 10 additions & 10 deletions _docs/sysadmin/installation/system_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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._
Expand All @@ -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._
Expand All @@ -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
Expand All @@ -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 = <MEMORY LIMIT>
Expand All @@ -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
Expand All @@ -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.
Expand Down
18 changes: 18 additions & 0 deletions _docs/sysadmin/installation/version_notes/v26.01.00.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions navtreedata.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ],
Expand Down
Loading