Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Question xmlapi - No Valid Command Given

    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 Code:
    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. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default

    Nobody?

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default

    Yes, those data is correct

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by mundaka View Post
    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 Code:
    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.
    The password_auth line has your cPanel username and your cPanel password, correct?

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by mundaka View Post
    Yes, those data is correct
    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.

Similar Threads & Tags
Similar threads

  1. 503 valid RCPT command must precede DATA with a twist...HELP
    By mfreund in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 10-07-2011, 03:50 AM
  2. exim is not working. 503 valid RCPT command must precede DATA
    By cool38 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-03-2006, 03:26 PM
  3. SMTP - 503 valid RCPT command must precede DATA
    By CopyrightPhilly in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-17-2006, 04:11 AM
  4. 503 valid RCPT command must precede DATA
    By ntwaddel in forum cPanel and WHM Discussions
    Replies: 26
    Last Post: 04-18-2006, 09:42 AM
  5. valid RCPT command must precede DATA
    By kernow in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-24-2006, 03:24 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube