Edjet LMS Server 6.4

Setup a Windows server

This tutorial will guide you trough the setup of a virtual or physical server with Windows operating system.

Article outline:

Introduction

Edjet LMS can be run on any Windows version or edition, that can run required software. It can also run on Linux and in the Docker container.

This guide was tested with:

  • Windows Server 2016
  • Windows Server 2019

Launch a Windows server

You can use any cloud provider of your choice to launch virtual machine or use any other way to run a Windows server.

Follow the tutorial Get started with Amazon EC2 Windows instances.

Install and configure Apache

Download and install Apache 2.4 webserver and run the webserver as a service.

  1. Download latest C++ Redistributable Visual Studio 2015,2017,2019 (vc_redist_x86) from https://www.apachelounge.com/download/.
  2. Install downloaded C++ Redistributable.
  3. Download latest Apache 2.4 32-bit from https://www.apachelounge.com/download/.
  4. Unzip downloaded archive into C:\Apache24\
  5. Run cmd.exe as an Administrator to install Apache httpd service:
    C:\Apache24\bin\httpd.exe -k install
  6. Start Apache service:
    C:\Apache24\bin\httpd.exe -k start
  7. Enable mod_rewrite in the config file "C:\Apache24\conf\httpd.conf":
    uncomment line
    LoadModule rewrite_module modules/mod_rewrite.so
  8. Enable htaccess override in config file "C:\Apache24\conf\httpd.conf" in section <Directory "${SRVROOT}/htdocs">:
    change
    AllowOverride None
    to
    AllowOverride All
  9. Restart the Apache webserver:
    C:\Apache24\bin\httpd.exe -k restart

Setup HTTPS connection (SSL)

Configure Apache to setup setup HTTPS connection and SSL certificates to run Edjet LMS securely.

  1. Enable Apache SSL module in the config file "C:\Apache24\conf\httpd.conf":
    uncomment line
    LoadModule ssl_module modules/mod_ssl.so
    and uncomment line
    Include conf/extra/httpd-ssl.conf
    and uncomment line
    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
  2. Redirect requests from http to https for your domain/hostname in the config file "C:\Apache24\conf\httpd.conf":
    ServerName lms.example.com:80
    RewriteEngine On 
    RewriteCond %{HTTPS}  !=on 
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
    Replace "lms.example.com" with your domain/hostname.
  3. Copy your SSL certificates (.crt and .key) into "C:\Apache24\conf\".
  4. To match certificate names and Apache config, you can either:
    • Rename the files to "server.crt" and "server.key".
    • Update the Apache config to your names.
  5. Configure https for your domain/hostname in the config file "C:\Apache24\conf\exra\httpd-ssl.conf":
    ServerName lms.example.com:443
    Replace "lms.example.com" with yout domain/hostname.
  6. Restart the Apache webserver:
    C:\Apache24\bin\httpd.exe -k restart

For more information and Apache documentation visit http://httpd.apache.org/

Install and configure PostgreSQL

Download and install PostgreSQL and enable support in PHP.

  1. Download PostgreSQL 10 32-bit from: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads.
  2. Run downloaded installer (with standard priviledges) and install PostgreSQL.
    • Install into "C:\PostgreSQL\" folder.
    • Install all components including pgAdmin4 (recommended).
    • Keep other setting in default (data directory, port 5432, superuser username,...).
  3. To enable PostgreSQL support in PHP (load a db driver via Apache), open Apache config file "C:\Apache24\conf\httpd.conf" and add this line to the end of file:
    LoadFile "C:\PostgreSQL\bin\libpq.dll"

Create LMS database

Create a new database to be used by LMS.

  1. Run any SQL manager (you can use installed PgAdmin4).
  2. Log into PostgreSQL using "postgres" superuser.
  3. Create new role "template_c6":
    • Create role with a password.
    • Enable login and create database priviledges.
  4. Create new database named "learnis"* with owner "template_c6":
    database encoding must be set to UTF-8 otherwise the installation will fail.
    *You can choose different name according to your project name.

Install and configure PHP

Download and install PHP and configure php.ini.

  1. Download latest PHP 7.2 32-bit VC15 x86 from: https://windows.php.net/downloads/releases/archives/.
  2. Unzip downloaded archive into "C:\php\
  3. Enable Apache webserver PHP 7.2 support in the Apache config file "C:\Apache24\conf\httpd.conf":
    add following lines to the end of the file:
    LoadModule php7_module "C:/php/php7apache2_4.dll"
    AddHandler application/x-httpd-php .php
    # configure the path to php.ini
    PHPIniDir "C:/php"
    <FilesMatch \.php$>
    SetHandler application/x-httpd-php
    </FilesMatch>
  4. Rename "c:\php\php.ini-production file to php.ini
  5. Enable required extensions in the config file "c:\php\php.ini":
    add following lines to the end of the file:
    extension=C:/php/ext/php_pgsql.dll
    extension=C:/php/ext/php_mbstring.dll
    extension=C:/php/ext/php_gd2.dll
    extension=C:/php/ext/php_fileinfo.dll
    extension=C:/php/ext/php_openssl.dll
    extension=C:/php/ext/php_ldap.dll
  6. Enable short open tags in the config file "c:\php\php.ini":
    change line
    short_open_tag = Off
    to
    short_open_tag = On
  7. Set max. upload size using config file "c:\php\php.ini":
    upload_max_filesize = 500M
  8. Set max. post size using config file "c:\php\php.ini":
    post_max_size = 508M
  9. Set max. input vars using config file "c:\php\php.ini":
    max_input_vars = 100000
  10. Set correct timezone using config file "c:\php\php.ini" (date.timezone)
  11. Restart the Apache webserver:
    C:\Apache24\bin\httpd.exe -k restart

Other PHP configuration

  1. Add path to PHP folder "C:\php" into Windows Environment variables (System variables).
  2. Create folder for LMS temporary data in " C:\php\tmp".

Install and configure ionCube Loader

  1. Download ionCube PHP Loader for Windows (VC15, 32 bits) from: https://www.ioncube.com/loaders.php.
  2. Unzip downloaded archive.
  3. Copy file "ioncube_loader_win_7.2.dll" to folder "C:\php\ext\"
  4. Enable the loader in the config file "c:\php\php.ini":
    add following line to the end of the file:
    zend_extension=C:/php/ext/ioncube_loader_win_7.2.dll
  5. Restart the Apache webserver:
    C:\Apache24\bin\httpd.exe -k restart

Configure Task Scheduler

Task Scheduler is used to run Edjet LMS Server scripts periodically.

  1. Launch Windows Task Scheduler.
  2. Add new task:
    • Configure the task trigger to run every 5 minutes (recommended).
    • Configure action: Start a program - to run a script:
      C:\php\php.exe C:\Apache24\htdocs\components\cron_launcher.php

Download Edjet LMS Server

Download Edjet LMS Server installation file (zip archive) to the server and prepare everything for the LMS installation.

The Edjet LMS application files will be placed in the folder "C:\Apache24\htdocs".

  1. Clear all files (including hidden files, .htaccess etc.) in the folder "C:\Apache24\htdocs".
  2. Download the Edjet LMS Server 6.4.23 installation file.
  3. Extract the content of the installation archive to "C:\Apache24\htdocs"

You have completed the server setup. Congratulations!
Now you can move to the installation of Edjet LMS Server.

Troubleshooting setup

If you are reporting issues, please provide as much info about the error as possible, namely:

  • Provide operating system including version.
  • Provide what software dependencies you use, including versions.
  • Provide (copy & paste) text(s) or screenshot(s) of any error(s) displayed during setup.
  • Provide any other additional info that can help us to find a solution for error.
Installation and upgrade