Cpanel Migration to DA Php selection error

kebirhost

Verified User
Joined
Jul 8, 2019
Messages
110
Hello,

I have migrated one account from cpanel to DA and the account has php 5.4. After restore to DA the account has php 5.6 which is the main php version. Server has already php 5.6, php 7.3 and php 5.4.

We will migrate thousands accounts and it is very difficult set php version after migration.

Could you look at this issue please?

Thanks,
Melih
 
this is the quickly solution untill DA fix the converter issue whit multiphp (easyapache4)
this works only whit Easypache 4 multiphp


1. find your php version you installed

cat /usr/local/directadmin/custombuild/options.conf

checked php setting like this
This is my seting how looks like

#PHP Settings
php_release=7.2
php1_mode=php-fpm
php2_release=7.3
php2_mode=php-fpm
php3_release=5.6
php3_mode=php-fpm
php4_release=5.4
php4_mode=php-fpm


this is the number i used for my php version
PHPVER1= 1 --> php7.2
PHPVER2= 2 --> php7.3
PHPVER1= 3 --> php5.6
PHPVER1= 4 --> php5.7


change yours PHPVER1="your number" in Following codes

#######CPANELto DA EASYAPACHE 4 PHPVERSION##########
CPANEL_USERDATA="${DIRECTADMIN_BACKUPS}/${USERNAME}_cpanel_to_convert/userdata/${CONVERTED_DOMAIN}"

grep "phpversion" $CPANEL_USERDATA >> ${DIRECTADMIN_BACKUPS}/${USERNAME}_cpanel_to_convert/userdata//phpversion.txt
PHPVER=$(awk '{print $2}' ${DIRECTADMIN_BACKUPS}/${USERNAME}_cpanel_to_convert/userdata//phpversion.txt)

rm -f ${DIRECTADMIN_BACKUPS}/${USERNAME}_cpanel_to_convert/userdata//phpversion.txt

if [ "${PHPVER}" = "ea-php73" ]; then
PHPVER1="2"
fi

if [ "${PHPVER}" = "ea-php54" ]; then
PHPVER1="4"
fi

if [ "${PHPVER}" = "ea-php56" ]; then
PHPVER1="3"
fi

if [ "${PHPVER}" = "ea-php72" ]; then
PHPVER1="1"
fi
#############PHP 7.0 php 7.1 ##########################
if [ "${PHPVER}" = "ea-php70" ]; then
PHPVER1="2"


if [ "${PHPVER}" = "ea-php71" ]; then
PHPVER1="2"


##### PHPVERSION_END###########################


for the php 7.0 , php 7.1. users
force them to php 7.2 or php 7.3

change PHPVER1 ="your php 7.2 or php7.3 number"

2. Make backup of file
cd /usr/local/directadmin/scripts/cpanel_to_da

cp cpanel_to_da.sh cpanale_to_da.sh.bak


use a editor like nano or vi and edit the file /usr/local/directadmin/scripts/cpanel_to_da

find #Create domain.conf line after this line
put the all codes you allready changed whit yours PHPVER1 numbers


then find the line

echo "php=ON" >> ${CONVERTED_DOMAIN_CONF}

after this line put following 2 codes

echo "php1_select=$PHPVER1" >> ${CONVERTED_DOMAIN_CONF}
echo "php2_select=0" >> ${CONVERTED_DOMAIN_CONF}


Then save the file cpanel_to_da.sh

good luck
 
0.0.15 version of the script should auto-match the versions if they're set/available in CustomBuild.

Changelog of 0.0.15:
Code:
* If cpmove-user.tar is given for backup, .tar format is used for restored
* Custom subdomain paths are moved to default locations
* PHP selection is transferred, if the same version of PHP is available on the destination server
[COLOR=#333333]* searches 3 levels depth in public_html for changed MySQL username (if it's >16 chars) and replaces it there, [/COLOR]leaving a copy of the file with ".cpanel_backup_copy.php" ending (better safe than sorry).
* auto-changes softaculous cronjob path to DA one

It's an experimental version, so, not yet available by default. To download it:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh.0.0.15

Please note it'll get overwritten with CustomBuild updates if you do any :)
 
Last edited:
Hello,

It is very good news. I hope we can migrate many cpanel servers to DA without any serious issue.

Thanks for kind and fast help,
Melih
 
0.0.15 version of the script should auto-match the versions if they're set/available in CustomBuild.

Changelog of 0.0.15:
Code:
* If cpmove-user.tar is given for backup, .tar format is used for restored
* Custom subdomain paths are moved to default locations
* PHP selection is transferred, if the same version of PHP is available on the destination server
[COLOR=#333333]* searches 3 levels depth in public_html for changed MySQL username (if it's >16 chars) and replaces it there, [/COLOR]leaving a copy of the file with ".cpanel_backup_copy.php" ending (better safe than sorry).

It's an experimental version, so, not yet available by default. To download it:
Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh.0.0.15

Please note it'll get overwritten with CustomBuild updates if you do any :)


How can I get error in username or name database character size?

Can we use values like 30? Do you have any problem in leaving the value too large?

What improvements are working for DA? We need it to be as close to the cPanel as possible, have there any major updates and improvements coming?
 
How can I get error in username or name database character size?

Can we use values like 30? Do you have any problem in leaving the value too large?

What improvements are working for DA? We need it to be as close to the cPanel as possible, have there any major updates and improvements coming?

It only affects database usernames (not DB names) of >16 characters. Regarding improvements - we're working on them since 2002 :) Are you missing something? I'd suggest placing a feature request in "Feedback & Feature Requests" category. Thank you.
 
What improvements are working for DA? We need it to be as close to the cPanel as possible, have there any major updates and improvements coming?


No, those of us who have been using directadmin for almost 15 years don't want directadmin to be as close to cpanel as possible.

We want directadmin to stay lean, stable and free of bloatware.
 
No, those of us who have been using directadmin for almost 15 years don't want directadmin to be as close to cpanel as possible.

We want directadmin to stay lean, stable and free of bloatware.

+1 to that. I would also NOT want DirectAdmin to be anything like cPanel at all. If DirectAdmin in the future would be like a cPanel clone, it would not be usefull to us anymore.
 
+1 to that. I would also NOT want DirectAdmin to be anything like cPanel at all. If DirectAdmin in the future would be like a cPanel clone, it would not be usefull to us anymore.

I am referring to some of the features that cPanel has that makes it very accessible to the end user.

For example, how do I enable extensions in PHP in DA?
 
Hello,

0.0.15 version of the script cannot still select the correct php version. I backed up an account which is using php 5.4. I restored it to DA with the new DA conversion script but the account selected default php version as php 5.6.

Thanks,
Melih
 
Hello,

0.0.15 version of the script cannot still select the correct php version. I backed up an account which is using php 5.4. I restored it to DA with the new DA conversion script but the account selected default php version as php 5.6.

Thanks,
Melih

Was PHP 5.4 installed on the system where you converted the backup on?
 
Hello,

Yes, php 5.4 installed and i can select it after restoration.

I restored from Admin Backup section.

What is my mistake?

Thanks,
Melih
 
Hello,

Yes, php 5.4 installed and i can select it after restoration.

I restored from Admin Backup section.

What is my mistake?

Thanks,
Melih

May you try if 0.0.17 solves it? :)

Code:
wget -O /usr/local/directadmin/scripts/cpanel_to_da/cpanel_to_da.sh https://custombuild.eu/cpanel/cpanel_to_da.sh.0.0.17
 
Hello Martynas,

Yes this new version fixed the issue. We are still testing DA. We will start to migrate after a week.

Thanks,
Melih
 
How do you migrate it ?

Hi,

How to transfer from cpanel ? Isn't there any interface for it like WHM's Transfer Tool ??

Thanks.
 
We need it to be as close to the cPanel as possible,

I love the Directadmin has its own identity, It fast, support many thing which even cpanel not done it and it more stable then CP

Transferred several hundred accounts by using this script, i hope it will be some builtin feature will be introduce as well backup
 
I love the Directadmin has its own identity, It fast, support many thing which even cpanel not done it and it more stable then CP

Transferred several hundred accounts by using this script, i hope it will be some builtin feature will be introduce as well backup

Glad to hear it. It is going to be added into the system. They are still tweaking it based on feedback for cpanel converts.
 
Hello,

I hope DA can add transfer script to migrate suspended accounts as suspended accounts in DA panel. I think script restores suspended accounts as unsuspended.

Thanks,
Melih
 
Back
Top