I've set PHP 8.3 as the default, but it's not being applied on the actual site. How can I make PHP 8.3 the default?

I’ve set PHP 8.3 as the default, but it’s not being applied on the actual site. How can I make PHP 8.3 the default?

I read the post. In the terminal, with root privileges:

# sed -i '/^\t"php-8.2",/a \\t"php-8.3",' /usr/local/hestia/web/edit/server/index.php
# v-add-web-php 8.3

Now, in HestiaCP, go to https://mydomain:8083/edit/server/, then navigate to Web Server > System PHP Version > 8.3 > Save.

However, when checking the PHP version on the actual site, it was still set to the default value, 7.4 (the previous setting). After changing it to PHP 8.3 by going to WEB > Edit Web Domain > Advanced > Backend Template PHP-FPM > default to PHP8.3, and then saving it, PHP 8.3 was applied successfully.

To set PHP 8.3 as the default, follow the last step and ensure that PHP 8.3 is selected as the backend template PHP-FPM.

For setting PHP8.3 as the default via the terminal, use:

# v-change-sys-php 8.3

This command should change the default value to PHP 8.3. It’s a success. Is this correct?

After trying it out, there have been cases where PHP 8.3 crashes on the web server, and some sites still don’t properly apply the default 8.3 setting. Only when PHP 8.3 is manually selected does it get applied.

However, every time I tried to save the user settings by changing the backend template value, PHP 8.3 crashed. T_T

Could you please try this patch?

apt install patch -y
cp /usr/local/hestia/bin/v-change-sys-php /usr/local/hestia/bin/v-change-sys-php.original
cd /tmp/
wget "https://gist.githubusercontent.com/sahsanu/cd3c75bbb8e0c592694e3d0f03584699/raw/a93508e155a5319774e0140afe3e17b043d4d4fc/v-change-sys-php_1.8.11.patch"
patch -l /usr/local/hestia/bin/v-change-sys-php < v-change-sys-php_1.8.11.patch

Try again to set default PHP from Web UI or command line::

v-change-sys-php 8.3
1 Like