Solved Error restoring domain: php1_select and php2_select must be 0-2

aobh

Verified User
Joined
Feb 28, 2014
Messages
20
Hi,

At the moment I am migrating from one server to another. The backup of 1 user is going fine (with 4 domains). However when I try to restore I get the following error:

Domain domain1 Created: Domain Created Successfully
Domain domain2 Created: Domain Created Successfully
Domain domain3 Created: Domain Created Successfully
Domain domain4 Created: Domain Created Successfully
Error restoring domain: php1_select and php2_select must be 0-2
Error restoring domain: php1_select and php2_select must be 0-2
Error restoring domain: php1_select and php2_select must be 0-2
Error restoring domain: php1_select and php2_select must be 0-2

The originating server has php81, php73 and php56

The new server has php81 and php74

I am using php81 on both servers for this user.

What might the problem be?

Originating server has options.conf:
#PHP Settings
php1_release=5.6
php1_mode=php-fpm
php2_release=7.3
php2_mode=php-fpm
php3_release=8.1
php3_mode=php-fpm
php4_release=no
php4_mode=php-fpm
secure_php=yes
php_ini=no
php_timezone=Europe/Amsterdam
php_ini_type=production
x_mail_header=yes

and new server has options.conf

# PHP Settings
php1_release=8.1
php1_mode=php-fpm
php2_release=7.4
php2_mode=php-fpm
php3_release=no
php3_mode=php-fpm
php4_release=no
php4_mode=php-fpm
secure_php=yes
php_ini=no
php_timezone=Europe/Amsterdam
php_ini_type=production
x_mail_header=yes
 
Can anybody help me with this? Do I need to provide more information?
 
Problem just with that on old servers there was 3 versions and on new only 2, so when it try to restore it see that there is no php number3, because it don't fix exact php version in backup - only position in selector. On old server it was #3 on new #1, so after restore just manually switch php for restored domain.
 
just temporary enable php3_release to php7.3 ( atleast not too old ). after restore success, switch your user website to php1_release and then remove php3_release version, clean all any relate to php7.3
 
I added a 3rd PHP release and the problem was gone ;-).
Then it's a bug! Needs to be fixed. Suppose this user is going to another hosting provider and must be restored there and this provider only has 2 php versions or maybe even 1?
IMHO there should be a check for this and if no php3 available, restoration should be restored to default php version.

@fln @smtalk
 
I can confirm this bug is still present.. I can't believe that I cannot import a backup because my local Directadmin installation is not sure about what php to use, and will refuse to restore :rolleyes:
 
Back
Top