Attempting to set the PHP handler in WHM via MultiPHP Manager returns the below error:
The supplied domain name is invalid. [php_set_handler]
The error can also be received when running cPanel updates or changing the handler manually in SSH/CLI.
whmapi1 php_set_handler version='ea-php74' handler='lsapi'
reason: "API failure: (XID afv893) The supplied domain name is invalid."
If multiple users partially own the same domain name, it will cause issues changing PHP versions or handlers. This error is commonly caused by multiple users owning a specific file on the system at the path
/etc/valiases/. We've observed these issues can occur when swapping domains between accounts where an operation may have failed or was performed incorrectly. Correcting the ownership of the related file will resolve the issue.
Fix the ownership of the
valiases file by running the script below from the command line as the "root" user.