Help Desk Help Desk   Phone +1 (917) 409-7605 M-F 10am-6pm EST   Client Login  
Home
Features
Screenshots
Live Demo
Free Trial
Pricing
Help Desk
Search:
Help Desk » Installation and Upgrade » Load balance server environment setup
Load balance server environment setup

IMPORTANT: Be sure your PHP Live! system is v.4.5 or greater.

 

Information

The phplive/web/ directory contains all the dynamically changing files, which can be a problem on a load balance environment.  The basic idea is to set the phplive/web/ directory to a central mounted shared directory that can be accessed by all the load balance server nodes.

 

Mounted Shared Directory

You will need to setup a shared mounted directory that can be accessed by all the server nodes.  For example, /mount/shared/ directory that is central directory all  the server nodes can access.  The shared mounted directory can be NTFS or UNIX file system.  The shared mounted directory will need to have full read/write permission access by the web service.  In general, it’s a good idea to have a central shared directory for various reasons.

 

The documentation will assume the shared mounted directory is  /mount/shared/ and the original server node installation is /home/node1/htdocs/phplive/

 

  1. Create a new directory /mount/shared/phplive_shared/ and make  sure the /mount/shared/phplive_shared/ directory has full read/write permission by the web service.
  2. Install the PHP Live! system on one of the server nodes.
  3. Move the entire contents of the newly installed PHP Live! system's phplive/web/ directory to /mount/shared/phplive_shared/ directory.  The phplive/web/ directory should now be empty and the /mount/shared/phplive_shared/ directory should now contain the following files:

    config.php

    vals.php

    VERSION.php

    chat_initiate/

    chat_sessions/

    patches/

  4. Create a new phplive/web/config.php with the following contents:

    <?php
    $CONF =
    Array() ;

    $CONF['DOCUMENT_ROOT'] = addslashes( '/home/node1/htdocs/phplive' ) ;
    include_once( "/mount/shared/phplive_shared/config.php" ) ;
    ?>

  5. Create a new file phplive/API/Util_Extra_Pre.php with the following contents:

    <?php
    $CONF['CONF_ROOT'] = '/mount/shared/phplive_shared' ;

    ?>

  6. Copy the entire phplive/ directory to all the server nodes.  For each server node, edit the phplive/web/config.php and update the variable $CONF['DOCUMENT_ROOT'] to the corresponding path of the PHP Live! system on that server node.
  7. Edit the file /mount/shared/phplive_shared/config.php and delete the following two lines:

    $CONF = Array() ;
    $CONF['DOCUMENT_ROOT'] = addslashes( '/home/node1/htdocs/phplive' ) ;

  8. Done!

 

 

Upgrading the PHP Live! system on a load balance environment:

  1. On one of the server nodes, upgrade the PHP Live! system by following the standard upgrade procedures.
  2. Sync the upgraded PHP Live! system to all the server nodes so that each server has the newly upgraded files.
  3. Done!
Was this helpful?
could be more helpful? let us know
3 people found this helpful