I activated PHP 8.3 for both my website and the system and ngnix simply does not start, returning to 8.2 everything goes back to normal.
Note only with php 8.3, if I activate 8.2 ngnix starts again
How?
If it doesn’t start you must check the log to know the cause.
https://forum.hestiacp.com/t/how-to-install-php8-3-for-hestia/12159/3
~# php -v
PHP 8.3.13 (cli) (built: Oct 30 2024 11:27:41) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.13, Copyright (c) Zend Technologies
with Zend OPcache v8.3.13, Copyright (c), by Zend Technologies
If I stop the php 8.2 service or remove it the site doesn’t work.
If you are using Hestia 1.8.12 you didn’t need to use this command:
sed -i '/^\t"php-8.2",/a \\t"php-8.3",' /usr/local/hestia/web/edit/server/index.php
If you did it, you have duplicated the line "php-8.3",
so you should edit /usr/local/hestia/web/edit/server/index.php
and remove the duplicated line.
But did you change the php version for your web domain or it keeps using the default version?
And again, if no logs, no idea what’s going on.
HI sorry delay, what line?
Remembering that when I changed to PHP 8.3 it did not appear in the web interface
// List supported php versions
exec(HESTIA_CMD . “v-list-web-templates-backend json”, $output, $return_var);
$backend_templates = json_decode(implode(“”, $output), true);
unset($output);
$v_php_versions = [
“php-5.6”,
“php-7.0”,
“php-7.1”,
“php-7.2”,
“php-7.3”,
“php-7.4”,
“php-8.0”,
“php-8.1”,
“php-8.2”,
“php-8.3”,
];
sort($v_php_versions);
if (empty($backend_templates)) {
$v_php_versions = ;
}
Could you tell me the steps to change the PHP version to make sure I’m doing it correctly and which logs you want?
Thanks best support
Then you changed it before version 1.8.2 so there is no need to remove anything.
If you see all the needed php versions then it is installed.
v-lists-sys-php
To change the php version for your site you need to edit the web domain and select the right php version on Backend Template PHP-FPM field.
As you didn’t talk about Apache, I suppose you are using Nginx standalone.
When Nginx doesn’t start:
systemctl restart nginx
systemctl status nginx --no-pager -l
You should also check (replace YourDomain
by the actual domain):
/var/log/nginx/error.log
/var/log/nginx/domains/YourDomain.error.log
I didn’t change the file
v-lists-sys-php
root@painel:~# v-lists-sys-php
v-lists-sys-php: command not found
root@painel:~# v-lists-sys-php
v-lists-sys-php: command not found
root@painel:~# sudo v-lists-sys-php
sudo: v-lists-sys-php: command not found
root@painel:~# logout
ubuntu@painel:~$ v-lists-sys-php
v-lists-sys-php: command not found
Backend Template is default and show error change for 8.3 and back for default solved problem
Thanks
Maison
When using su
is important to use the dash (-
) to load env variables.
sudo su -
v-list-sys-php
or
sudo /usr/local/hestia/bin/v-list-sys-php
Could you please show the template you are using for your web domain, the template itself and the nginx conf?
Replace YourUser
, YourDomain
and YourTemplate
by the actual data.
sudo su -
v-list-web-domain YourUser YourDomain json | jq -r '.[]|{TPL,BACKEND}'
cat /usr/local/hestia/data/templates/web/nginx/php-fpm/YourTemplate.{tpl,stpl}
cat /home/YourUser/conf/web/YourDomain/nginx.conf
cat /home/YourUser/conf/web/YourDomain/nginx.ssl.conf
root@painel:~# sudo /usr/local/hestia/bin/v-list-sys-php
VERSION
--------
8.3
mine is only showing 8.2 i had to use v-add-web-php 8.3