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.

addpop, addforward fails

Discussion in 'cPanel Developers' started by steelaz, Aug 6, 2009.

  1. steelaz

    steelaz Member

    Joined:
    Nov 19, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    WHM 11.24.2

    Creating cpanel account works fine, but addpop and addforward fails. Here is a sample call:

    Code:
    /xml-api/cpanel?user=$username&xmlin=<cpanelaction><module>Email</module><func>addpop</func><apiversion>1</apiversion><args>$email_user</args><args>$email_pass</args><args>$email_domain</args></cpanelaction>
    Instead of returning result or proper error message this is what I get (raw, inluding headers):

    Code:
    HTTP/1.1 200 OK
    Server: cpsrvd/11.24
    Location: /xml-api/cpanel
    Content-type: text/xml
    Connection: close
    
    domain.com
    
    Where domain.com is a value from $email_domain variable. Can someone explain what's the problem here?
     
  2. steelaz

    steelaz Member

    Joined:
    Nov 19, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Problem solved, there was extra new line character after one of the variables. Still, some sort of error message from API would be appreciated.
     
  3. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Could you post the exact string you were sending. We may have already improved the error handling in 11.25 to catch the condition, however we would like to be sure it will catch this.

    Thanks
     
  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
    I usually recommend checking /usr/local/cpanel/logs/error_log when something goes wrong with an XML API function call as that is usually a good source of information for debugging XML API calls.
     
Loading...
Similar Threads - addpop addforward fails
  1. StianSomoen
    Replies:
    3
    Views:
    293

Share This Page