Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

After update to cPanel 66, error 255 in fetchzone_records

Discussion in 'cPanel Developers' started by swbrains, Sep 4, 2017.

  1. swbrains

    swbrains Well-Known Member

    Joined:
    Sep 13, 2006
    Messages:
    54
    Likes Received:
    2
    Trophy Points:
    158
    My server updated to cPanel version 66 this morning and I rebooted it. Now when my script calls API function, it returns the following XML:

    <cpanelresult>
    <apiversion>1</apiversion>
    <error>“/usr/local/cpanel/cpanel” exited with status 255 ().</error>
    <data>
    <result>0</result>
    <reason>“/usr/local/cpanel/cpanel” exited with status 255 ().</reason>
    </data>
    </cpanelresult>

    I don't know why it shows apiversion as "1" in the resulting XML when I specified cpanel_xmlapi_version=2 in my call (see below)

    In the script our call to the API looks like this:
    http://[somedomain.com]:2082/xml-api/cpanel?user=[userid]&cpanel_xmlapi_module=ZoneEdit&cpanel_xmlapi_func=fetchzone_records&cpanel_xmlapi_version=2&domain=[somedomain.com]

    FWIW, I tried using the fetchzones function instead of fetchzone_records and it works (returns all zone record data), but the output is not in a similar format and my script would need to change significantly to parse that ouput for what's needed.

    This is a blocking issue as we can no longer accept new customers since the script involved is required to run to set up a new customer account.

    Nothing has changed in this code or script recently and it was working immediately before rebooting the server. Is there some new setting that requires being changed in order for this API function to work?

    Thanks,
    Vinnie M.
     
    #1 swbrains, Sep 4, 2017
    Last edited: Sep 4, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I've been unable to reproduce this issue on a test system using the example you provided. Can you verify if this is still happening in cPanel version 66.0.18?

    Thank you.
     
  3. swbrains

    swbrains Well-Known Member

    Joined:
    Sep 13, 2006
    Messages:
    54
    Likes Received:
    2
    Trophy Points:
    158
    Hi,

    I was reading another thread regarding update 66 and saw in a response that XML-API is going away in the future, so I converted my code to use JSON-API and UAPI where possible. Now the fetchzone_records function works, so perhaps the problem was related to the XML-API version? Or perhaps you're test system is above my server version. I just saw that 66.0.18 was just released although I haven't updated to it yet after 66 broke my code. :)

    Regards,
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page