The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

xmlapi - No Valid Command Given

Discussion in 'cPanel Developers' started by mundaka, Jun 26, 2009.

  1. mundaka

    mundaka Member

    Joined:
    Jun 26, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi, I am trying to add a database using the php xmlapi, but when I exec the script I get a "No Valid Command Given".

    I don't find the solution :(
    Here is my code:

    PHP:
    include("xmlapi.php.inc");

    $ip "**.com";
    $root_pass "***";

    $account "***";
    $db_name "test";
    $db_user "***";
    $db_user_pass "***";

    $xmlapi = new xmlapi($ip);

    $xmlapi->password_auth("***",$root_pass);
    $xmlapi->set_port(2083); 
    $xmlapi->set_debug(1);

    print 
    $xmlapi->api1_query($account"Mysql""adddb", array($db_name));
    I am using that in a shared server.
     
  2. mundaka

    mundaka Member

    Joined:
    Jun 26, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
  3. mundaka

    mundaka Member

    Joined:
    Jun 26, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Yes, those data is correct
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The password_auth line has your cPanel username and your cPanel password, correct?
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Okay, re-run your command then go to view -> source in your browser and paste all the source that is returned. Since you have enabled debugging, this should assist in determining what is causing this issue.

    Please remove usernames and passwords if any appear in your output.
     
Loading...

Share This Page