midop
Macroseismic Intensity Data Online Publisher
  homepage        citation        download        manual        examples
manual index  >   setting up the midop environment  >   requested software configuration

Requested software configuration

MIDOP is a web application that runs on a stack made of a web werver (i.e. Apache or NGINX), MySQL and PHP installed on a local computer or a computer accessed on a intranet not exposed on the public web.
The adopted solution is therefore independent from the operating system used, it is tested on Windows, Linux and macOS.

As MIDOP is designed for people not necessarily experts on web technologies,
this page describes how to setup a pre-configured AMP environment to be used as the runtime environment for MIDOP.

More advanced users should already knows how to setup a webserver (i.e. Apache or NGINX), MySQL and PHP on their computer.
Beware that the webserver configuration must be configured to correctly show SVG and SVGZ images.
The PHP configuration too requires some custom settings (see below) and some PHP extensions requires to be installed (curl, gd2, mbstring, mysql, mysqli, pdo_mysql, pdo_odbc, soap, xml, zip).

Also, beware that the current MIDOP version have issues with PHP versions 5.5.x, so use version 5.4.x or a previous version.
Issues with PHP 5.5.x are caused by the way MIDOP accesses MySQL, and they will be fixed in a future release.

Finally, beware that the folders listed below (and their content) must be writeable by the user running the webserver (i.e. Apache or NGINX) process:

MIDOP has been successfully tested with these pre-configured AMP packages:

IMPORTANT SECURITY NOTES
  • installing an AMP environment requires administrative privileges on your computer and you will end up installing a web server.
    Please be aware that such installation might require approval by your Institution technical department, as it might impact on your local security installation policy;
  • packages such as XAMPP, WAMP and MAMP are not meant for production use (serving websites publicly on the Web), but only for developers in a development environment.
    These packages are configured to give the web-developer a lot of freedom, but this comes at the expenses of security.
    For a development platform on your (closed) PC this is great, but extremely exposed to attacks by hackers when in the wild open Internet.
    Do not use these packages for serving pages on the Internet without a fine-tuning session, possibly assisted by an IT professional.
NOTE FOR SKYPE USERS

Beware that the Apache server uses port 80 and 443. Softwares such Skype should be turned OFF as it uses the sampe ports.

In order to use Skype and Apache at the same time, follow this procedure:

  • Turn OFF Skype
  • Turn ON Apache and MySQL
  • Wait until the Apache server is up and running, checking by instance http://localhost
  • turn ON Skype, it will recognize that ports 80 and 443 are already in use and it will try to use other ports
Settings for      Windows      Mac OSX      Linux (Ubuntu)

 Windows   Installation procedure of XAMPP Lite or WAMP

<IfModule mime_module>
    ...
    AddType image/svg+xml .svg
    AddType image/svg+xml .svgz
    AddEncoding x-gzip .svgz
      <FilesMatch \.svgz$>
        <IfModule mod_gzip.c>
          mod_gzip_on No
        </IfModule>
      </FilesMatch>
    AddType application/vnd.google-earth.kml+xml .kml
    AddType application/vnd.google-earth.kmz .kmz
</ifModule>

precision = 18
max_execution_time = 120
max_input_vars = 3000
memory_limit = 950M
post_max_size = 64M
upload_max_filesize = 64M
error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On
auto_detect_line_endings = On
mbstring.internal_encoding = UTF-8

N.B. The above mentioned PHP parameters should be already in your "php.ini" configuration file. If a parameter is present, you should modify it according to the above value. If it is commented (preceded by a semicolon), you should un-comment it. If a parameter is missing, you should add it to the file, it doesn't matter in which position.

extension = php_curl.dll
extension = php_gd2.dll
extension = php_mbstring.dll
extension = php_mysql.dll
extension = php_mysqli.dll
extension = php_pdo_mysql.dll
extension = php_pdo_odbc.dll
extension = php_soap.dll

By clicking on the button "Start" of 1) Apache and 2) MySql you will enable respectively the web server and the database engine server:

It may occurs that the Windows Firewall will alert you because a newly installed software wants to access your network.
In order to correctly use MIDOP, you must enable both Apache and MySQL to access your network.

By pressing "Stop" you will turn off the servers.

b) if you are using WAMP, click on the system tray icon and select "Start All Services":

At this stage the environment is ready for the MIDOP installation.


 MacOS X   MAMP package installation procedure

Installation steps:

precision = 18
max_execution_time = 120
max_input_vars = 3000
memory_limit = 950M
post_max_size = 64M
upload_max_filesize = 64M
error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On
auto_detect_line_endings = On
mbstring.internal_encoding = UTF-8

N.B. The above mentioned PHP parameters should be already in your "php.ini" configuration file. If a parameter is present, you should modify it according to the above value. If it is commented (preceded by a semicolon), you should un-comment it. If a parameter is missing, you should add it to the file, it doesn't matter in which position.

MAMP control panel with Servers started.

MAMP control panel with Servers stopped.

Your OSX system is now ready for the MIDOP installation.


 Linux (Ubuntu) LAMP installation procedure

Execute the following terminal commands:

Some web server customization must be manually done in order to use MIDOP.

AddType image/svg+xml .svg
AddType image/svg+xml .svgz
AddEncoding x-gzip .svgz
    <FilesMatch \.svgz$>
        <IfModule mod_gzip.c>
        	mod_gzip_on No
        </IfModule>
    </FilesMatch>
AddType application/vnd.google-earth.kml+xml .kml
AddType application/vnd.google-earth.kmz .kmz
location ~ \.svgz$ {
    add_header Content-Encoding "gzip";
}
precision = 18
max_execution_time = 120
max_input_vars = 3000
memory_limit = 950M
post_max_size = 64M
upload_max_filesize = 64M
error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On
auto_detect_line_endings = On
mbstring.internal_encoding = UTF-8
curl
gd2
mbstring
mcrypt
mime_magic
mysql
mysqli
pdo_mysql
pdo_odbc
soap
xml
zip

The Apache (and its PHP module) and the MySql servers are now installed. Also the MySql frontend called "phpmyadmin" is ready to be used.

Now check your installation:

Your Linux system is now ready for the MIDOP installation.

 

 
 top of
this page