Symptoms
The action fails when attempting to set a PHP version on an account. In the cPanel error log, the following errors can be observed.
Log file: /usr/local/cpanel/logs/error_log
warn [Internal Warning while parsing [stdin] 30786] Use of uninitialized value in -e at
/usr/local/cpanel/Cpanel/PHPFPM.pm line 915. at /usr/local/cpanel/Cpanel/PHPFPM.pm line 915.
Cpanel::PHPFPM::rebuild_files(HASH(0x1bfe5b8), 1, 1, 1) called at /usr/local/cpanel/Cpanel/PHP/Vhosts.pm
line 342
eval {...} called at /usr/local/cpanel/Cpanel/PHP/Vhosts.pm line 341
Cpanel::PHP::Vhosts::rebuild_configs_and_restart_fpm(HASH(0x1bfe5b8))
called at /usr/local/cpanel/Cpanel/PHP/Vhosts.pm line 312
Cpanel::PHP::Vhosts::rebuild_configs_and_restart(HASH(0x1bfe5b8))
called at /usr/local/cpanel/Whostmgr/API/1/Lang/PHP.pm line 297
Whostmgr::API::1::Lang::PHP::php_set_vhost_versions(HASH(0x1ccb308),
Whostmgr::API::1::Utils::Metadata=HASH(0x1cc3700), HASH(0x35dd6f8))
called at whostmgr/bin/xml-api.pl line 404
whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1cc3700),
HASH(0x1ccb308), HASH(0x35dd6f8), CODE(0x35d62e8)) called at
/usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::__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(0x36554c8), Try::Tiny::Catch=REF(0x3655678)) called at
/usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x35db768),
HASH(0x1ccb308), HASH(0x35dd6f8), HASH(0x35d8f80), CODE(0x35d62e8)) called at whostmgr/bin/xml-api.pl line 4252
whostmgr::bin::xml_api::runapp("php_set_vhost_versions",
HASH(0x35dd6f8), HASH(0x1bc04e8), 0, CODE(0x35d62e8)) called at whostmgr/bin/xml-api.pl line 3906
whostmgr::bin::xml_api::script(CODE(0x35d62e8), "-json", "./php_set_vhost_versions")
called at whostmgr/bin/xml-api.pl line 3849
Description
Userdata is a critical piece of data in cPanel when managing accounts. If this data is inconsistent with the number of domains and DNS entries for the account it can trigger failures in many areas. For example, if the number of domains doesn't match the associated DNS entries for an account in userdata, it can prevent the account from setting PHP versions. cPanel APIs write userdata to match different sets of data to keep track of domains being managed for an account.
Workaround
Restore the account from a backup or, as a last resort, rebuild userdata.
Important: Rebuilding userdata is the last resort. It is best to restore the account from backup if possible. Rebuilding userdata in an inconsistent state could result in missing domains for many accounts. However, if this is the only option, please perform with extreme caution.
Comments
0 comments
Article is closed for comments.