Symptoms
When trying to enable or disable PHP-FPM for a domain in MultiPHP Manager you may see this displayed as the error:
The system failed to apply the “PHP” version to "domain.tld": Cpanel::Exception::DomainNameNotAllowed/(XID me8gjt) The supplied domain name is invalid. at /usr/local/cpanel/Cpanel/WebServer/Userdata.pm line 391. Cpanel::WebServer::Userdata::get_vhost_lang_package(Cpanel::WebServer::Userdata=HASH(0x34a72c0), "vhost", "domain.tld", "lang", Cpanel::ProgLang::Supported::php=HASH(0x3a886b8)) called at /usr/local/cpanel/Cpanel/WebServer.pm line 435 Cpanel::WebServer::set_vhost_lang_package(Cpanel::WebServer=HASH(0x3a5d2b8), "vhost", "domain.tld", "lang", Cpanel::ProgLang::Supported::php=HASH(0x3a886b8), "user", "cpuser", "package", ...) called at /usr/local/cpanel/Cpanel/WebServer.pm line 530 Cpanel::WebServer::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100 eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91 Try::Tiny::try(CODE(0x3a5d1c8), Try::Tiny::Catch=REF(0x3c8eb20)) called at /usr/local/cpanel/Cpanel/WebServer.pm line 536
Description
In this case, the domain was missing from the user's cPanel configuration file.
Workaround
Modify /var/cpanel/users/cpuser and add the DNS line needed. They are incremented so if the last one was DNS4 then add DNS5=domain.tld of course changing the actual cPanel user and adding the missing domain.
Then run the following
/scripts/updateuserdatacache --force
/scripts/updateuserdomains --force
and then enabled/disable PHP-FPM for that domain.
Note: If there are multiple domains under the same cPanel account missing the errors will continue until all of them are corrected.
Comments
0 comments
Article is closed for comments.