Documentation
IPS_IsReplicationFailoverActive
bool IPS_IsReplicationFailoverActive ()
Returns
TRUE if the slave has been promoted to master, otherwise FALSE
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function checks whether the slave has been promoted to master and has thus taken over the tasks of the master (failover). This is the case after calling IPS_PromoteToReplicationMaster, after an automatic failover or if the configuration could not be loaded from the master on startup. As long as the result is TRUE, no synchronization with the master takes place. After IPS_DemoteToReplicationSlave, the result is FALSE again.
The function does not return whether the automatic failover is configured.
Example
if (IPS_IsReplicationFailoverActive()) {
echo "Failover since " . date("Y-m-d H:i:s", IPS_GetReplicationFailoverTime());
}
/* e.g. returns:
Failover since 2026-09-14 03:12:45
*/