cPanel Migration - cloudlinux php selector
I've noticed that when migrating cPanel accounts between servers, if the account has a PHP version selected (not native) this setting isn't carried over to the new server during the cpanel copy/transfer. So when doing a mass migration of 100's of accounts, we need to go through each of them individually and set their php version again.
Is this intended or a bug?
-
Hello :) cPanel will not transfer PHP selector configuration values when an account is copied to another server. You may find more information directly related to where Cloud Linux settings are stored (in order to manually copy that data for all accounts) on the Cloud Linux support forums or their documentation. Thank you. 0 -
Cloudlinux documentation has command line tool to manually set PHP version for specified usernames. So assuming you have 4 versions of PHP you may need to run it 4 times setting proper PHP verson for usernames requiring it. Same applies to your source server - using CL terminal utilities you can get a list of usernames and their PHP versions. Comes down to running few commands in terminal. 0 -
To be precise: Get the list of all users in the old system, then find the PHP version: /usr/bin/cl-selector --current=php --user=USERNAME will retrieve PHP version set for a particular user. The script gets the path from /var/cagefs/USERID/USERNAME/etc/cl.sel/php symlink, compares it with contents of /etc/cl.selector/selector.conf file and if path is valid, prints out the current interpreter version. In the destination server, repeat in reverse, setting PHP version for all usernames /usr/bin/cl-selector --select=php --version=5.3 --user=USERNAME sets the current PHP version for particular user by creating symlink in /var/cagefs/USERID/USERNAME/etc/cl.selector directory. All old symlinks are removed, and new symlinks are set. For bulk information retrieval and updates regex commands are your friends. 0
Please sign in to leave a comment.
Comments
3 comments