about replication in multiserver

Discussion in 'Developers' Forum' started by pinkfeet, Oct 18, 2015.

  1. pinkfeet

    pinkfeet Member HowtoForge Supporter

    Hello,

    i've got a multiserver scenario, an "ispconfig" server without services and a "webserver" with the web service available. I'm writing a bash script to automate the installation of a new php version and I want to add this new php version in dbispconfig database in "ispconfig" server. For now the the script do the work but the changes are not replicated in the webserver's dbispconfig database as i expected; otherwise the new php version may be choosed in each website as normal and it works correctly. So, i don't know if i must insert the new php version in the "webserver" too or do something in order to force the replication of the new information.

    Thanks a lot,

    Regards
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Hi,

    normally you would do that with the ISPConfig remote API, but there is no API function for adding additional PHP versions yet so you will have to use the datalogInsert function of the ISPConfig MySQL databas class directly.

    The function has these parameters:

    datalogInsert($tablename, $insert_data, $index_field)

    Example:

    $app->db->datalogInsert('server_php', '(server_id,client_id,name,.........) VALUES (..........)', 'server_php_id');

    this has to be run on the amster only, it will insert the data into the master database and it also inserts a record into the sys_datalog table which will cause the data to be replicated to the slave.
     
  3. pinkfeet

    pinkfeet Member HowtoForge Supporter

    Hi,

    ok, i will try that.

    Thank you very much Til,

    Regards,
     

Share This Page