Friday 20 June 2008 2:29:17 am
Hi. We're working in a clustering installation of ez. We have four siteaccess. lets call siteA, siteA_admin, siteB, and siteB_admin
siteA and siteA_admin should work with database A siteB and siteB_admin should work with database B we have doing all the stuff about clusterize things, but i'm a bit worried about the file index_cluster.php The documentation shows this code
<?php
define( 'STORAGE_BACKEND', 'mysql' );
define( 'STORAGE_HOST', 'localhost' );
define( 'STORAGE_PORT', 3306 );
define( 'STORAGE_SOCKET', '' );
define( 'STORAGE_USER', 'user' );
define( 'STORAGE_PASS', 'pass' );
define( 'STORAGE_DB', 'name' );
define( 'STORAGE_CHUNK_SIZE', 65535 );
include_once( 'index_image.php' );
?>
But how can we worki with two databes? We have added some condition usign $_SERVER['HOST_NAME']. Depending on the host name, we define storage_user, storage_pass and storage_db All is working very well, but i think this is not a really elegant solution. Do you know any other ways to have this working? We're thinkin in a way to set this things by siteaccess, but i don't really know,if we can use ezIni in this file... Thank you.
|