The PHP Selector option offered by CloudLinux enables users to select the appropriate PHP version for their website. However, when utilizing the PHP Selector option within cPanel, you may encounter an error message and pop-up as follow:
No selector dir for user XXX
After an account migration, it’s common for users to encounter difficulties accessing or utilizing the PHP Selector. An error message, similar to the one mentioned above, is often displayed when attempting to use the PHP Selector.
Environment
- CageFS
- PHP Selector
Solution
The solution is pretty straightforward, we just need to run the following commands as a root user:
/usr/sbin/cagefsctl --rebuild-alt-php-ini CPANEL_USER
/usr/sbin/cagefsctl --force-update && /usr/sbin/cagefsctl -m CPANEL_USER
Replace CPANEL_USER with actual cPanel username in which you are facing an issue.
Cause
The issue is caused due to the lack of the .cl.selector directory in the user’s home directory, which is vital for the correct operation of the Selector as it contains its main configuration files.