webCOMAND

webCOMAND Windows Computer Set Up

Install webCOMAND on a Windows computer or laptop to use it without an internet connection, for development, or other reasons.

Prerequisites

Before you install webCOMAND, your computer should have the following solution stack.

If the software above is not already installed, you can install XAMPP (recommended), WAMP or AMPPS.

XAMPP

As of 3/24/2017, the latest XAMPP download installs the following:

  • PHP 7.1.1 (x86, Thread Safe, MSVC14 (Visual C++ 2015) )
  • Strawberry Perl 7.0.56 Portable
  • Web Server: Apache 2.4.25
  • HTTPS/SSL Support: OpenSSL 1.0.2
  • Database: MariaDB 10.1.21
  • Database Web Interface: phpMyAdmin 4.6.5.2
  • XAMPP Control Panel 3.2.2

Install XAMPP

  • Download from: https://www.apachefriends.org/download.html
    (latest tested: xampp-win32-7.0.8-0-VC14-installer.exe)
  • Run installer and make sure to install at least: Apache, MySQL, PHP, Perl
  • Install to C:\xampp or similar.
  • Start XAMPP Control Panel
  • Click main Config in upper-right
    • Autostart: Apache, MySQL
    • Service and Port Settings: set Apache Main Port to 880 and SSL Port to 8443
    • Click Save and Save again
  • Click Apache > Config > httpd.conf and:
    • Change line that reads "Listen 80" to "Listen 880".
    • Change the line that reads "ServerName localhost:80" to "ServerName localhost:880"
    • Immediately following that line, add:
      ProxyRequests Off
      ProxyPass /com_webcomand/websocket/ ws://localhost:8084
    • Save & Close
  • Click Apache > Config > httpd-ssl.conf and:
    • Change line that reads "Listen 443" to "Listen 8443".
    • Save & Close
  • Click Apache > Config > php.ini and:
    • Change line that reads " memory_limit=128M" to " memory_limit=1G"
    • Change line that reads "post_max_size=8M" to "post_max_size=64M"
    • Change line that reads " upload_max_filesize=2M" to " upload_max_filesize=64M"
    • Save & Close
  • Start Apache
  • Click MySQL > Config > my.ini
    • Change line that reads "max_allowed_packet = 1M" to "max_allowed_packet = 64M"
    • Immediately following that line (or anywhere in [mysqld] block), add or modify lines for:
      # convert uppercase table queries to lowercase
      lower_case_table_names = 1

      # index 2+ character words in search index
      ft_min_word_len = 2

      Save & Close
  • Start MySQL
  • Open web browser to: http://localhost:880/

ImageMagick

ImageMagick is image processing software that can be used from the command line interface (CLI) or as a library from PHP, Perl, etc.  webCOMAND can utilize ImageMagick to implement image processing features (thumbnails, resizing, etc.), so it is a good idea to install it if you plan to manage images in webCOMAND.

Install ImageMagick

Install Imagick PHP Extension

For more detailed instructions, see: https://herbmiller.me/installing-imagick-php-7/
  • Download PHP DLL from: http://windows.php.net/downloads/pecl/releases/imagick/
    (latest tested: 3.4.2/php_imagick-3.4.2-7.0-ts-vc14-x86.zip)
  • Extract php_imagick.dll to C:\xampp\php\ext
  • [NOTE: ONLY DO FOLLOWING TO RESOLVE DLL VERSION MISMATCH]
    Extract all files that start with CORE_ to C:\xampp\imagick
  • Click Apache > Config > php.ini and:
    • After the last line that starts with "extension=", add line that reads "extension=php_imagick.dll"
    • Save & Close
  • Add C:\xampp\imagick to the Path Environment Variable (right-click "This PC" or "My Computer", Properties, Advanced system settings, Advanced, Environment Variables..., System Variables, Path)
  • REBOOT!
  • Start Apache & MySQL again
  • Open web browser to: http://localhost:880/dashboard/phpinfo.php#module_imagick
    (you should see information populated for "ImageMagick supported formats")

Install Ghostscript for PDF support in Imagick

If you would like to be able to open and convert PDFs to images, you will also need to install Ghostscript.

It seems the 32-bit version must be installed to work properly on Windows with the 32-bit version of ImageMagick and Imagick.  Version 9.0.8 and 9.09 do not seem to work.  9.07 and 9.10 do work though.  9.19 also works and is much faster.

Install webCOMAND

  1. Download - Download webCOMAND from webomand.com/download.
  2. Install - Unzip the downloaded archive to a suitable location in the file system.  For XAMPP, use: C:\xampp\webcomand
  3. Set Up webroot - Copy all (3) files inside the webroot folder to the web server document root.  They can also be copied to a sub-folder within the document root if desired.  For XAMPP, create and use: C:\xampp\htdocs\webcomand
    • Update the require_once() line in index.php with the proper relative path to where comand.php was installed in the previous step.  For XAMPP, use: require_once( '../../webcomand/comand.php' );
  4. Configure - Open a web browser to http://localhost:880/webcomand/, or the URL that corresponds to where you copied the webroot files, and follow the set up instructions.
There are currently no set up instructions.  Instead a fatal error displays because the config.php and database are not properly configured, so follow these steps:
  1. Set up a config.php file in the webcomand install folder (same folder as comand.php).
    <?php
    $config = [
        'io_comand' => [
            'comand' => [
                'loader' => [
                    'package_paths' => [
                        COMAND_HOME.'/files/packages'
                    ]
                ]
            ]
        ],
        'io_comand_package' => [
            'install_path' => COMAND_HOME.'/files/packages'
        ],
        'io_comand_repo' => [
            'repo' => [
                'auth' => [
                    'username' => 'admin'
                    //'oid' => 839
                ]
            ],
            'database' => [
                'username' => 'root',
                'password' => ''
            ]
        ],
        'io_comand_process' => [
            'process' => [
                'php_path' => 'C:/xampp/php/php.exe',
                'php_env' => [
                    'PATH'=>'C:/Program Files (x86)/ImageMagick-6.8.1-Q16'
                ],
                'perl_path' => 'C:/xampp/perl/bin/perl.exe',
                'perl_env' => [
                    'PATH'=>'C:/Program Files (x86)/ImageMagick-6.8.1-Q16'
                ],
            ]
        ]
    ];
    
  2. Create database with PHPMyAdmin
    • Click MySQL > Admin or open web browser to: http://localhost:880/phpmyadmin/
    • Click "Databases" at top.
    • Enter "webcomand", select collation "utf8_general_ci" and click Create
    • Click "Import" at top.
    • Click "Browse..." and select the file: C:\xampp\webcomand\packages\io_comand_repo\install\webcomand.sql
    • Click "Go" at bottom, and wait for a minute while the default database is populated.
      NOTE: If the core database is not up to date, you may need to run:
      cd C:\xampp\webcomand
      C:\xampp\php\php.exe comand.php io_comand_package update
      C:\xampp\php\php.exe comand.php io_comand_repo diagnose -m repair
  3. Open a web browser to: http://localhost:880/webcomand/
    • Login with username "admin" and password "testing"
    • Click "Content Manager" in Apps list
    • Expand "System" folder on left and click "Users"
    • Click the New button (+) at top of user list.
    • Add user for yourself
      • Account Tab: Enter Username, Email, First and Last Name
      • Security Tab: Enter Password
      • Access Tab: Check System Administrator and Active
      • Click Approve
    • Logout (upper-right)

Once set up, you are ready to sign in.