xmlapi setsiteip works only partly

kjg

Well-Known Member
Mar 2, 2004
158
3
168
When running setsiteip and changing an accounts IP, the data shown in WHM after is partly correct and partly not:

Ex:
domain: test123.com
user: test123
IP after having created the account: 123.123.123.111

Running:
$xmlapi->setsiteip("123.123.123.222",""," test123.com");

When checking in WHM some parts are changed and others not:
IP Functions » Show IP Address Usage
shows 123.123.123.111 (old IP)

IP Functions » Change a Site’s IP Address
Shows: Current Address: 123.123.123.222 (new IP)

Account Information » List Accounts
shows 123.123.123.111 (old IP)

DNS Functions » Edit DNS Zone
shows 123.123.123.222 (new IP)

Should I run some "post setsiteip script" in order to solve this, or how can I make it all work correct?
Running setsiteip with user or domain gives the same result.

If I change the IP via WHM all info shows the new IP.

// kjg
 

kjg

Well-Known Member
Mar 2, 2004
158
3
168
Since there are no reply at all on this and the other xmlapi question I had, I suppose there are other ways today to solve this and we are one of the few still using the xmlapi. Will have to update myself on what alternatives there are today.

But for those that still uses xmlapi and have the same issues with setsiteip as we had, was solved it by setting owner to root first (it was a reseller owned account), then change IP via setsiteip and after that change owner to reseller again.
I guess the reason why it works is that modifyacct runs the postmodifyacct automatically after the changes, but I am not sure that is the whole truth. But it works.

// kjg