Good day,
Our team has encountered a hitch with our newly created test server in which we are trying to create a subdomain using xmlapi.php that uses functions such as api1_query() to create the subdomain, this method works with our older server. However upon trying the same on our new server we can't seem to create a subdomain. We are able to create a subdomain manually by going to the subdomains screen. upon checking that xmlapi.php created an error log that looks like this:
in which $CPANEL_USER is the username/host name. I have browsed the internet for anything related to our concern with no luck, being a beginner in development operations I still lack the knowledge to resolve such issues and would greatly appreciate any help from the community. thank you...
Our team has encountered a hitch with our newly created test server in which we are trying to create a subdomain using xmlapi.php that uses functions such as api1_query() to create the subdomain, this method works with our older server. However upon trying the same on our new server we can't seem to create a subdomain. We are able to create a subdomain manually by going to the subdomains screen. upon checking that xmlapi.php created an error log that looks like this:
Code:
[06-Sep-2017 05:16:54 UTC] URL: [URL]https://$CPANEL_USER.com:2083/json-api/cpanel[/URL]
[06-Sep-2017 05:16:54 UTC] DATA: dir=%2Fpublic_html%2Fsecured%2Fmcs&rootdomain=$CPANEL_USER.com&subdomain=test&user=$CPANEL_USER&cpanel_xmlapi_module=SubDomain&cpanel_xmlapi_func=addsubdomain&cpanel_xmlapi_apiversion=2
[06-Sep-2017 05:16:54 UTC] Authentication Header: Authorization: Basic cmFjZXRvMWI6cmFjZS0xMjM=
[06-Sep-2017 05:19:02 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'curl_exec threw error "Failed to connect to $CPANEL_USER.com port 2083: Connection timed out" for [URL='https://$CPANEL_USER.com:2083/json-api/cpanel?dir=%2Fpublic_html%2Fsecured%2Fmcs&rootdomain=$CPANEL_USER.com&subdomain=test&user=$CPANEL_USER&cpanel_xmlapi_module=SubDomain&cpanel_xmlapi_func=addsubdomain&cpanel_xmlapi_apiversion=2']https://$CPANEL_USER.com:2083/json-api/cpanel?dir=/public_html/secured/mcs&rootdomain=$CPANEL_USER.com&subdomain=test&user=$CPANEL_USER&cpanel_xmlapi_module=SubDomain&cpanel_xmlapi_func=addsubdomain&cpanel_xmlapi_apiversion=2[/URL]' in /home/$CPANEL_USER/public_html/secured/cpanel/xmlapi.php:693
Stack trace:
#0 /home/$CPANEL_USER/public_html/secured/cpanel/xmlapi.php(615): xmlapi->curl_query('[URL]https://raceto1[/URL]...', 'dir=%2Fpublic_h...', 'Authorization: ...')
#1 /home/$CPANEL_USER/public_html/secured/cpanel/xmlapi.php(814): xmlapi->xmlapi_query('cpanel', Array)
#2 /home/$CPANEL_USER/public_html/secured/cpanel/index.php(41): xmlapi->api2_query('$CPANEL_USER', 'SubDomain', 'addsubdomain', Array)
#3 {main}
thrown in /home/$CPANEL_USER/public_html/secured/cpanel/xmlapi.php on line 693
Last edited by a moderator: