MIMICView-PHP Web-based GUI to MIMIC

  1. Table of Contents
  2. Overview

    This patch adds a sample PHP web-browser-based GUI to MIMIC patterned after the MIMICView GUI Explorer view. It presents a subset of the MIMICView features, and serves as a sample of web-based control of MIMIC with the PHP API.

    For example, a PHP-based GUI can serve as a portal to MIMIC simulations running on one or more MIMIC servers on any public / private cloud.

  3. Prerequisites
  4. This sample application is based on the MIMIC PHP API update package as documented in the online documentation. It runs as a web service on a web server, which may or may not be the same as the MIMIC machine.

    The web server machine serving the GUI should have PHP 5.5 or newer installed, and a HTTP server like Apache available out-of-the-box on most recent Linux versions. The /etc/httpd/conf/httpd.conf configuration file needs this line to embed PHP in HTML files:

    AddHandler application/x-httpd-php .html
    

    Make sure to restart the HTTPD after adding the above line, eg.

    # /etc/init.d/httpd restart
    

    Copy the php/mimicview folder from the MIMIC shared area to the web server root folder, eg. /var/www/html/php/mimicview on default Apache.

    Copy the php/Mimic folder from the MIMIC shared area to the php/mimicview/packages/ folder under the web server root folder, eg. /var/www/html/php/mimicview/packages/Mimic on default Apache.

    Configure one or more MIMIC servers to manage in /var/www/html/php/mimicview/config/MimicConfig.php For example, add these lines for one MIMIC server at address 192.9.200.84 for user demo.

    // demo 
    $host = "192.9.200.84";
    $USER = "demo";
    $MIMIC_PRIV_DIR= "c:/Users/demo/mimic.demo";
    $MIMIC_DIR = "c:/Apps/Mimic.1600";
    
    $Servers[$host]['USER'] = $USER;
    $Servers[$host]['MIMIC_PRIV_DIR'] = $MIMIC_PRIV_DIR;
    $Servers[$host]['MIMIC_DIR'] = $MIMIC_DIR;
    

  5. Usage

    Once you have setup the web server as detailed above then the GUI is accessible from a web browser, eg. http://your-server/php/mimicview/.

    Figure 1: MIMICView-PHP

  6. Compatibility
  7. We have tested this GUI with common commercial browsers (Firefox, Chrome,...) on both Linux and Windows, with the PHP code running on a web server driven by both Apache on Linux and XAMPP on Windows..