« Back to Product

Documentation

IPS_IsReplicationActive

 bool IPS_IsReplicationActive ()

Returns

TRUE if the replication is active, otherwise FALSE

Description

Warning

This function is intended for internal use only and may change or be removed at any time without notice.

The function checks whether the replication is active, i.e. whether the system is a slave. For this, the extension Mirroring must be licensed and the replication must have been activated when the service was started.

The result remains TRUE even after a promotion to master (IPS_PromoteToReplicationMaster). Whether the slave has currently taken over the tasks of the master is returned by IPS_IsReplicationFailoverActive.

Example

if (IPS_IsReplicationActive() && !IPS_IsReplicationFailoverActive()) {
    echo "This system is a slave and is synchronized by the master";
}
Any questions?