1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

sitebuilder API CreateSite2 problem

Discussion in 'SiteBuilder' started by JR Gould, Mar 8, 2009.

  1. JR Gould

    JR Gould Guest


    I have been toying around with the sitebuilder API though I am currently running stuck on an issue that the documentation does not seem to cover.

    I have installed and configured the sitebuilder properly ( made a default plan, setup the configuration, note that when making accounts manually, it DOES work perfectly )

    Now we are trying to create a scenario where new customers will automatically get a hosting account and a sitebuilder configured to connect only to that hosting account.

    to achieve just that, I use the following piece of code in PHP:

    Now this is pretty much exactly according to the examples given in the API reference.
    It also seems to do the job to the extent that it actually "makes" the account + hosting package.
    However the hosting account will not be able to publish his site.
    This is presumably because of a problem with the hosting ID.

    Upon looking in the mysql table I stumble accross these settings which are different from sites I create manually
    In the site_publish_settings mysql table the host_id will be set to NULL, as well as the FTP port being set to NULL.
    Changing the host_id to 1 and the ftp port to 21 WILL fix this issue.
    So í'm considering a "hack solution" where I just connect to mysql to correct this manually, though i'd simply prefer the sitebulder api working.

    when I "print_r()" the site object and result in PHP I get the following information:

    (* actual regged hosting domain replaced with clientdomain.nl )
    It seems clear that it's not getting the proper HostId set.
    Now i've tested this and It does not actually matter what ID i fill in as host ID (even one that really exists) its not returning any valid hosting number)

    i've tried toying around with the 'VerifyStatus' and 'Address' fields but with little luck.
    (note that there are only 2 other accounts in there at this time, im aware of possibility of overlapping IDs)

    The weird thing is, if I actually login through the admin panel and browse to the user's site that was created and click "verify location" it WILL actually verify!
    (upon checking the database, publishing_settings, the field host_id will have become 1 and the FTP port 21, this is all that changes).
    I'm beginning to suspect a bug in the sitebuilder code.

    now my questions are:

    1. Is there any step I might have missed, anything wrong with my code that stands out?

    2. What number should the "publishing ID" (id) be ? unique? non-unique? (this is covered no where)

    3. What kind of number should the "hosting ID" (hostID) be? in the example they use the number '12', this seems incorrect?

    4. The 'address' field is considered deprecated, what should i put in there instead? why is it still being used as it is in your examples?
  2. DejanD

    DejanD Guest

    This is definitely a bug in Sitebuilder API...

    I see that this is reported 8 months ago and still not fixed..??

    How long does it usually take for a bug in Sitebuilder to be fixed?

    Is there some other way to report bugs, or it's enough to be reported here on this forum?
  3. FranciscoN

    FranciscoN Guest

    Hello ¿¿??
  4. holykim66

    holykim66 Guest

    Hi JR Gould

    I am very new at Sitebuilder. I have exactly the same problem as Soap doesn't work properly for creating a site. The host_id and port are NULL and the site can not be published until I manually save the publishing settings from the control panel.

    Could you please advise if you have any ideas to resolve this problem?

    Thanks in advance.

  5. holykim66

    holykim66 Guest


    This issue has been resolved. Login to Sitebuilder Admin panel.

    Users > Plans > Publishing Settings

    Must tick 'Allow users to modify publishing settings'.

    That's it.

  6. holykim66

    holykim66 Guest


    Hi All

    This issue has been resolved. Please login to Sitebuilder Admin panel.

    1. Go to Manage Plans
    2. Click a Plan Name
    3. Click Publishing Settings
    4. Tick 'Allow users to modify publishing setting'

    That's it.

    Missing 'Hostid' and 'FTP Port' won't be issued as they will be updated from the user panel.