# Removed PHP 7.4

**URL:** <https://community.passbolt.com/t/removed-php-7-4/7239>\
**Category:** Community Feedback\
**Created:** [April 27, 2023, 12:40pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239 "2023-04-27T12:40:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSMadcow](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DSMadcow](https://community.passbolt.com/u/DSMadcow)\
**Post date:** [April 27, 2023, 12:40pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/1 "2023-04-27T12:40:22Z")

</div>

So I did something dumb, I removed PHP (7.4) and installed PHP 8.1.  
Now Passbolt does not launch.  
Is there any way to recover from this?  
If not can I reinstall Passbolt and connect it to the current Passbolt DB?

---

<div class="post-metadata">

**Author:** ![clayton](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@clayton](https://community.passbolt.com/u/clayton)\
**Post date:** [April 27, 2023, 12:42pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/2 "2023-04-27T12:42:52Z")

</div>

Welcome to the forum @DSMadcow !

What distribution are you using?

---

<div class="post-metadata">

**Author:** ![clayton](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@clayton](https://community.passbolt.com/u/clayton)\
**Post date:** [April 27, 2023, 12:47pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/3 "2023-04-27T12:47:24Z")

</div>

On some distributions it is necessary to also edit the `/etc/nginx/sites-enabled/nginx-passbolt.conf` file.

There will be a line like:

```auto
 fastcgi_pass unix:/run/php/php7.4-fpm.sock;

```

and you’ll want to change that to

```auto
fastcgi_pass unix:/run/php/php8.1-fpm.sock;

```

and then restart nginx

---

<div class="post-metadata">

**Author:** ![DSMadcow](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DSMadcow](https://community.passbolt.com/u/DSMadcow)\
**Post date:** [April 27, 2023, 2:09pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/4 "2023-04-27T14:09:26Z")

</div>

@clayton made the change you mentioned.  
nginx will not start now, fails on the nginx-passbolt.conf.

I see it has the following in the conf file as well:  
root /usr/share/php/passbolt/webroot;  
and that does not exist anymore. I think that may also be an issue, any idea where I need to point this or how to recreate that directory with the correct index index.php files?

server {

# Managed by Passbolt

server\_name [bolt.lddrew.com](http://bolt.lddrew.com);

client\_body\_buffer\_size 100K;  
client\_header\_buffer\_size 1K;  
client\_max\_body\_size 5M;

client\_body\_timeout 10;  
client\_header\_timeout 10;  
keepalive\_timeout 5 5;  
send\_timeout 10;

root /usr/share/php/passbolt/webroot;  
index index.php;  
error\_log /var/log/nginx/passbolt-error.log info;  
access\_log /var/log/nginx/passbolt-access.log;

# Managed by Passbolt

# include **PASSBOLT\_SSL**

location / {  
try\_files $uri $uri/ /index.php?$args;  
}

location ~ .php$ {  
try\_files $uri =404;  
include fastcgi\_params;  
fastcgi\_pass unix:/run/php/php8.1-fpm.sock;  
fastcgi\_index index.php;  
fastcgi\_intercept\_errors on;  
fastcgi\_split\_path\_info ^(.+.php)(.+)$;  
fastcgi\_param SCRIPT\_FILENAME $document\_root$fastcgi\_script\_name;  
fastcgi\_param SERVER\_NAME $http\_host;  
fastcgi\_param PHP\_VALUE “upload\_max\_filesize=5M \n post\_max\_size=5M”;  
}

---

<div class="post-metadata">

**Author:** ![DSMadcow](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DSMadcow](https://community.passbolt.com/u/DSMadcow)\
**Post date:** [April 27, 2023, 2:12pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/5 "2023-04-27T14:12:40Z")

</div>

@clayton I am running Debian 11 on a cloud server.

Lauren

---

<div class="post-metadata">

**Author:** ![clayton](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@clayton](https://community.passbolt.com/u/clayton)\
**Post date:** [April 27, 2023, 2:20pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/6 "2023-04-27T14:20:57Z")

</div>

what steps did you take for removal of 7.4 and installing 8.1?

One way around this if you just want to get back up and running is to [migrate](https://help.passbolt.com/hosting/upgrade/ce/migrate-existing-ce-to-debian-server.html) to a new server

From what you’ve described you should still have access to the parts you need to spin up a new one with your data

---

<div class="post-metadata">

**Author:** ![DSMadcow](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DSMadcow](https://community.passbolt.com/u/DSMadcow)\
**Post date:** [April 27, 2023, 2:40pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/7 "2023-04-27T14:40:47Z")

</div>

mysql will not run either.  
So I have screwed this server I think.

I have a snapshot from a couple of weeks ago. so I am restoring my server to that and will work on this again once that is done.

Thanks for the help.

Lauren

---

<div class="post-metadata">

**Author:** ![DSMadcow](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DSMadcow](https://community.passbolt.com/u/DSMadcow)\
**Post date:** [April 27, 2023, 3:24pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/8 "2023-04-27T15:24:40Z")

</div>

So I restored from a snapshot from 14 Apr.  
I had moved the mariaDB data to block storage, so the passboltdb was on the block storage and not the internal storage. It did not get over written whit the snapshot restore .

Pointed mairadb to the data files on the block storage and restarted nginx and now I have access to passbolt again and have all my data without having to migrate it.

So PHP is important, if you remove it you will break everything on your server. Just don’t do that.

Lauren

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [April 27, 2023, 4:22pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/9 "2023-04-27T16:22:02Z")

</div>

If you try it again, install php8.1 first without uninstalling php7.4. The default php version will change to 8.1 and 7.4 files could be uninstalled afterwards.

Good thing you had a backup!

---

<div class="post-metadata">

**Author:** ![Duffman](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/duffman/32/3667_2.png) [@Duffman](https://community.passbolt.com/u/Duffman)\
**Post date:** [April 28, 2023, 11:20pm UTC](https://community.passbolt.com/t/removed-php-7-4/7239/10 "2023-04-28T23:20:03Z")

</div>

To check the current version of command-line PHP, run

> php --version

To set PHP#.# as the system default PHP version, run the following command

> sudo update-alternatives --config php
