Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



PHP Configuration

To use the functions of CUBRID HA in PHP, connect it to the broker by using cubrid_connect_with_url, which is used to specify the connection information of the failover broker in the connection URL. The attribute specified for CUBRID HA is althosts, the information on one or more broker nodes to connect when a failover occurs.

The following example shows how to configure PHP.

<?php

$con = cubrid_connect_with_url ("cci:CUBRID:primary_broker:33000:testdb:::?althosts=secondary_broker:33000", "dba", NULL);

if ($con < 0)

{

      printf ("cannot connect to database ");

      return 1;

}

?>