Skip to content

Commit

Permalink
Update php upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
danny6167 committed Jul 8, 2024
1 parent 3692541 commit 30cbd95
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions guides/php_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ table below to check what version you need for your version of Pterodactyl.
| 1.0.0 - 1.2.0 | 7.3, 7.4 |
| 1.3.0+ | 7.4, 8.0 |
| 1.8.0+ | 7.4, 8.0, 8.1 |
| 1.11.0+ | 8.0, 8.1 |
| 1.11.0 - 1.11.3 | 8.0, 8.1 |
| 1.11.4+ | 8.1, 8.2, 8.3 |

## Install PHP

In order to install PHP 8.1, you will need to run the following command. Please keep in mind different operating systems
In order to install PHP 8.3, you will need to run the following command. Please keep in mind different operating systems
may have slightly different requirements for how this command is formatted.

```bash
# Add additional repository for PHP
add-apt-repository -y ppa:ondrej/php
apt -y update
apt -y install php8.1 php8.1-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip}
apt -y install php8.3 php8.3-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip}
```

## Update Composer
Expand All @@ -35,14 +36,14 @@ composer self-update --2

:::: tabs
::: tab "NGINX"
After upgrading to PHP 8.1, you will most likely need to update your NGINX configuration. Your configuration file
After upgrading to PHP 8.3, you will most likely need to update your NGINX configuration. Your configuration file
is most likely called `pterodactyl.conf` and located in the `/etc/nginx/sites-available/` directory, or if on CentOS,
`/etc/nginx/conf.d/`.

Make sure to update the path in the command below to reflect the actual location of your configuration file.

``` bash
sed -i -e 's/php[7|8].[0-9]-fpm.sock/php8.1-fpm.sock/' /etc/nginx/sites-available/pterodactyl.conf
sed -i -e 's/php[7|8].[0-9]-fpm.sock/php8.3-fpm.sock/' /etc/nginx/sites-available/pterodactyl.conf
```

Once you have edited the file run the command below to reload nginx and apply your changes.
Expand All @@ -53,14 +54,14 @@ systemctl reload nginx

:::
::: tab "Apache"
Run the commands below to disable all previous PHP versions and enable PHP 8.1 when serving requests.
Run the commands below to disable all previous PHP versions and enable PHP 8.3 when serving requests.

``` bash
# Hint: a2dismod = a2_disable_module 🤯
a2dismod php*

# Hint: a2enmod = a2_enable_module 🤯
a2enmod php8.1
a2enmod php8.3

```

Expand Down

0 comments on commit 30cbd95

Please sign in to comment.