MemoDisx Installation

MemoDisx can work in OS/2 or in Unix systems. If you try to use it under Windows, MemoDisx will think that it runs under OS/2. It might work but it is neither tested nor supported.

MemoDisx requires the following software tools:

Other requirements depend on the operating system:

If you wish to store the contents of archives you must have InfoZip, tar, gzip and bzip2. It is not necessary to have all of them, you will select later which of them you wish to use.

MemoDisx makes full use of Content negotiation. Before you continue with installation, you must configure Apache for MultiViews. It is usually preconfigured but the distributed configuration file may contain a bug in definition of the Czech language. The correct ISO code is cs, not cz!

MemoDisx is now available in English and Czech. Be sure that your configuration file includes negotiation_module and contains the following directives:

AddLanguage en .en
AddLanguage cs .cs
AddCharset iso-8859-2 .iso8859-2

It is allowed to assign more extensions to each language. You can also define other languages.

You should also configure languages in your WWW browser. The primary MemoDisx language is English. Be sure that your WWW browser contains generic English.

MemoDisx supports only one database for all users. If you must use several databases, you must install several distinct copies of MemoDisx.

First the database table must be created by someone with administrative right for MySQL. The commands are prepared in the incl.dbcreate.txt file. Be sure that you first edit at least the password.

Now you can prepare files for Apache. Copy the whole directory to the location where Apache expects PHP files. This directory must have write permission for the user under which Apache runs! Do not forget to set umask 0, otherwise you will not be able to grant write permission to all users. Be sure that you have server-side includes enabled. Afterwards you must configure MemoDisx using the statements from incl.htaccess (put them to the main configration file). The contents is explained in the following text.

# MemoDisx configuration
# ======================
# PHP4 and SSI must be enabled.
# MySQL must be installed on the same host.
# AddLanguage and AddCharset directives must be properly set.
# The system will NOT work without register_globals off.
# SSL is not necessary but recommended unless you access MemoDisx
# from your local computer and you are not sure that there is
# no TCP/IP spy which could reveal your password to someone else.

<Directory @@PHPDocumentRoot@@/memodisx>

Replace the directory name with the one used on your server.

  AllowOverride None
  Options +MultiViews +IncludesNOEXEC
  DirectoryIndex index

These directives configure SSI and MultiViews for this directory.

  <IfModule mod_php4.c>
    # AddType application/x-httpd-php php
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    php_admin_flag register_globals off
  </IfModule>

The great advantage of PHP is that its parameters can be set in the Apache configuration file on the per-directory basis. We will thus not place the settings to php.ini in order not to disturb other scripts.

MemoDisx does not register globals for security reasons and handles quotes itself. The AddType directive usually appears in the main config and need not be repeated here.

  <IfModule mod_ssl.c>
    SSLRequireSSL
  </IfModule>

SSL is not required but is recommended unless you are sure that no network spy can read your password.

  <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault M3
    ExpiresByType text/css "access 1 day"
    ExpiresByType image/gif "access 1 month"
    ExpiresByType image/jpeg "access 1 month"
  </IfModule>

The pages are dynamically generated, therefore their expiration must be properly set. Without this module MemoDisx may not load new pages but display the old contents.

  <IfModule mod_headers.c>
    <FilesMatch "\.php$">
      Header append Pragma "no-cache"
      Header set Cache-Control "no-cache, must-revalidate, private"
    </FilesMatch>
  </IfModule>

This part prevents caching the contents in the WWW browser.

  <FilesMatch "incl\.">
    Order allow,deny
    Deny from all
  </FilesMatch>

These files contain functions and sensitive information which must not be displayed.

  AuthGroupFile @@SecurityFiles@@/groups
  AuthUserFile @@SecurityFiles@@/users
  AuthName "MemoDisx"
  AuthType Basic
  require valid-user
  # require group memodisx
  # require user memodisx Alice Bill Dinah Jabberwock Tweedledum Tweedledee

In order to prevent unautorized use it is recommended (but not strictly required) to adopt access restrictions. You can allow access to all users, to a group of users or to specified users. Superuser memodisx has special rights which are described in other parts of the manual.

</Directory>

You can limit the right to read the CD by creating file incl.readcd.config.php. Sample of such a file is distributed as incl.readcd-x.config.php. You can use the following predefined constants:

_superuser_ Superuser name (memodisx)
_x_user_ Current user
_x_user_ip_ IP address of the user's computer
_server_ip_ IP address of the server
_notallowed_ Error message

If you wish to make a demo version, save a copy of incl.demo-x.php as incl.demo.php.

If you have not done so, restart Apache, save a copy of incl.install.php as install.php and start MemoDisx in your WWW browser. You will see the next instructions in the online manual.