Error on saving server configuration: The specified PHP version format is invalid

Hello,

I am getting the following error when I try to save server configuration.

The specified PHP version format is invalid, it should look like [0-9].[0-9].Example: 7.0, 7.4, 8.0

It is a freshly installed Hestia on Ubuntu 20.04.

Installed with following command:

bash hst-install.sh --apache yes --phpfpm no --multiphp no --vsftpd yes --proftpd no --named yes --mysql yes --postgresql no --exim yes --dovecot yes --sieve no --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api no

I have tried reinstalling the OS and Hestia.

Here’s a screenshot of the error:

What happens when you run

v-add-web-php 7.4 in command line?

v-add-web-php 7.4 installs php 7.4 with the following output:

Installing PHP-7.4, please wait…

Enabling module proxy.
Enabling module proxy_fcgi.

The original error still occurs. The default installed php version is

php -v
PHP 8.0.16 (cli) (built: Feb 21 2022 14:42:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.16, Copyright (c) Zend Technologies
with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies

Just noticed the issue

You are running in modphp mode and it doesn’t support multiple php version or changing php version in that case.

Run the upgrade script in https://github.com/hestiacp/hestiacp/blob/main/install/upgrade/manual/migrate_apache.sh to convert to php-fpm or do a reinstall and before running the command download the OS specific version and adjust the php version before install

I am not even changing any setting on the configure server page. I am just saving as it is and even without any change I am getting this error.

I dont want to use multiphp. I just want to install hestia with apache as backend and nginx as proxy with single php version 7.4 without php-fpm. That’s why i was using these options in command:

bash hst-install.sh --apache yes --phpfpm no --multiphp no --vsftpd yes --proftpd no --named yes --mysql yes --postgresql no --exim yes --dovecot yes --sieve no --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api no

Specifically these three options:

--apache yes --phpfpm no --multiphp no

These options used to work properly in the past as I have 5 servers installed with same installation process.

or do a reinstall and before running the command download the OS specific version and adjust the php version before install

Can you explain in detail? Should I install php from apt? before running the hestia install command?

PHP version is set in:

Before you install Hestia download https://raw.githubusercontent.com/hestiacp/hestiacp/main/install/hst-install-ubuntu.sh

And you able to set php version…

The error message it self is caused by a bug in php code where it accidentally run… Will get dressed in next version…

The original error was fixed in the latest release 1.5.10.

Although this wasn’t the main issue, here are the steps that I followed thanks to @eris to change the php version for installation to 7.4.

Download the ubuntu installer file:

wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-ubuntu.sh

Edit the installer file and change fpm_v="8.0" to fpm_v="7.4"

sudo nano hst-install-ubuntu.sh

Run the installer file with the options that you would use for hst-install.sh with hst-install-ubuntu.sh

bash hst-install-ubuntu.sh --apache yes --phpfpm no --multiphp no --vsftpd yes --proftpd no --named yes --mysql yes --postgresql no --exim yes --dovecot yes --sieve no --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api no

@eris Do you think and option for php version in the command would be great if --multiphp is set to no?

you still set there fpm to no, which will only install mod_php:

set it to yes and all should work as expected…

I want to install only mod_php

Why? There is basicly no reason to use mod_php, it will even get dropped from the installer with hestia 1.6.0.

It was just a personal preference, but since you said mon_php will be dropped… I should move to php_fpm.

Thanks for all the help @Raphael and @eris

A bit more informations about mod_php vs fpm: https://www.reddit.com/r/PHPhelp/comments/gqszb0/php_fpm_vs_apache_mod_php/

4 Likes

I have opted for php-fpm and multiphp for now. Thanks @Raphael for the reddit thread.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.