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.

cPanel API not working on our iWeb host.

Discussion in 'cPanel Developers' started by dbarbier, Mar 26, 2010.

  1. dbarbier

    dbarbier Registered

    Joined:
    Mar 26, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi everyone,

    We have a website hosted at iWeb & we can't seem to make the cPanel/WHM api work on it. We tried the API samples on another host and it works well out of the box. If it is misconfigured it display a correct error response.

    On our iWeb hosting it just output some PHP error.

    I looked on the web & I found some details about augmenting the memory available for curl in the code. I put a number 10 times higher & it didn't work either.

    Any clues?
    Thanks.
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What version of the XMLAPI class are you using? This was an issue in versions older than 1.0.2.
     
  3. dbarbier

    dbarbier Registered

    Joined:
    Mar 26, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi Matt,
    We are using version 1.0.3 of the API. Like we said earlier, it works right out of the box on other hosts. Is there any server config that might prevent the API from working?

    Thanks.
     
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When I have encountered this issue previously it was due to an issue with the size of the curl buffer. One thing that you can do is use fopen rather than curl by doing:

    Code:
    $xmlapi->set_http_client('fopen');
    If this is not an acceptable solution, please open a ticket at tickets.cpanel.net/submit and put in the title "ATTN:Matt Dees" so that I can look at it (I will need full access to the script's source and root on the system that it is running on)
     
  5. jcorreia

    jcorreia Well-Known Member

    Joined:
    Apr 25, 2005
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
  6. dbarbier

    dbarbier Registered

    Joined:
    Mar 26, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ah nice! Thanks jcorreia, this sort of fixed my problem.
    Now, I am just getting "access denied" error.

    I am now wondering, is it mandatory to have WHM credentials to use the API?
    I'm trying to use 2 functions(api1_query() & addpop()) and i'm always getting some "access denied" error.
     
  7. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    No, you can authenticate against cpanel via:

    $xmlapi->set_port(2083)

    The only available called in this context is the cpanel call.
     
Loading...

Share This Page