I use the API by calling the function:
returns error:
It seems to me that the function is joining the subdomain with the main domain and trying to remove "mysubtest.domain.com.maindomain.com".
Would this be a problem with the API or a bug with my function?
Can someone help me?
PHP:
$cPanel = new cpanelAPI($cpaneluser, $cpanelpass, 'maindomain.com');
$response = $cPanel->api2->SubDomain->delsubdomain(['domain' => 'mysubtest.domain.com']);
Code:
[QUOTE]Failed to find the domain(s): “mysubtest.domain.com.maindomain.com”. at /usr/local/cpanel/Cpanel/PHP/Config.pm line 255. Cpanel::PHP::Config::_get_php_config_for_domains(0, ARRAY(0x2ff8450)) called at /usr/local/cpanel/Cpanel/PHP/Config.pm line 275 Cpanel::PHP::Config::get_php_config_for_domains(ARRAY(0x2ff8450)) called at /usr/local/cpanel/Cpanel/PHPFPM.pm line 877 Cpanel::PHPFPM::_removedomain("mysubtest.domain.com.maindomain.com") called at /usr/local/cpanel/Cpanel/Sub.pm line 544 Cpanel::Sub::delsubdomain(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, 0, ...) called at bin/admin/Cpanel/domain.pl line 227 bin::admin::Cpanel::domain::__ANON__() called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Try/Tiny.pm line 95 eval {...} called at /usr/local/cpanel/3rdparty/perl/526/lib64/perl5/cpanel_lib/Try/Tiny.pm line 90 Try::Tiny::try(CODE(0x2e95aa8), Try::Tiny::Catch=REF(0x124c030)) called at bin/admin/Cpanel/domain.pl line 231 bin::admin::Cpanel::domain::script("bin::admin::Cpanel::domain") called at bin/admin/Cpanel/domain.pl line 41[/QUOTE]
Would this be a problem with the API or a bug with my function?
Can someone help me?
Last edited by a moderator: