Mason-CM Info   User: guest | Date: 1/22/2018 
Installation instructions for the Mason Content Management system

To run MCM you need Apache, Perl, mod_perl and Mason installed: 

Find apache:	use V 1.3*
Find Perl:		use V 5.6.1
Find mod_perl:		use V 1.26*
Find Mason:		use V 1.20

Mason from 1.14 to 1.19 should work too but is untested. 

Load Perl modules in Mason's and restart the server
MCM uses a number of Perl modules which must be referenced in Mason's (to ensure they load in the parent httpd and propagate to
the children, saving memory). You'll want something like this in your

    {	package HTML::Mason::Commands;
	use strict;
	# used for Mason-CM
	use Fcntl;
	use IO::File;
	use IO::Handle;
	use MLDBM;              # * Starred mods are available on CPAN
	use Image::Size;        # * The rest are normally bundled
	use URI::Escape;        # *
	use File::Spec;
	use File::Copy;
	use File::Find;
	use File::stat;
	use Text::Wrap;
	use Date::Format;
	use Date::Language;     # * at least TimeDate-1.14
	use LWP::MediaTypes qw(guess_media_type);
	use IPC::Run;           # * only needed when using spell checking
	use Rcs;                # * only needed when versioning enabled

If you do not use a handler, alternatively load them from httpd.conf:

    PerlModule Fcntl IO::File IO::Handle ...

Find modules on:

The 'mason-cm' directory has to be enabled as a Mason component 
root. It's recommended to place "mason-cm" in a subfolder of the 
component root and do the same for the 'shared' directory. 
Only the 'mason-cm' will be adressed in Apache configuration. 

Here an example of httpd.conf directory entry using a handler:
    PerlRequire /some/path/library/handler/

    <Directory /some/path/comproot/mason-cm/>
         DefaultType text/html
         Options ExecCGI
         SetHandler perl-script

You can use Mason httpd.conf settings or you're own handler.
See Mason manual for details how to set up a mason site.

         PerlHandler MCM::Mason
         AuthName "Mason-CM Login"
         AuthType Basic
         AuthUserFile /some/path/data/mason-cm/mcmUser.htaccess
         require valid-user

Prevent scripts and images beeing executed by MCM:
    <Location ~ "/script|/image">
         SetHandler default-handler
Or, if you use a handler, the following entry blocks non Mason
requests from beeing passed to the the Mason stack: 

    return -1 if $r->content_type && $r->content_type !~ m|^text/htm|i;

You can use both ways to set up the Mason environement; an external 
handler or by Apache directives. 

The MCM root has to be in a Mason 'comp_root'. It does not matter if 
you use:

    PerlSetVar  MasonCompRoot  "key=>comp_root"

If you want to have all errors properly redirected, also the ones 
apearing when hacking for files via the GET method. $m->autoflush or 
MasonAutoflush need to be set to undef. By default only requests 
having set 'batch' to true will be processed with $m->autoflush(0). 
So if people just click the interface the server performance is 
greater when using the Mason default $m->autoflush(1). 

To work properly the four globals has to loaded from start. 

    globals => ['$ses','$mcm','$prj','$req'],
    PerlSetVar  MasonAllowGlobals $ses
    PerlAddVar  MasonAllowGlobals $mcm
    PerlAddVar  MasonAllowGlobals $prj
    PerlAddVar  MasonAllowGlobals $req


Create an MCM root folder, named by your choice, somewhere in a Mason 
component root:

  + mason-cm          put MCM root in a configured Mason component 
                      root. See also: MASON CONFIGURATION

Unpack the distribution tarball into this created folder. This creates 
the following default MCM filesystem:

    +-- conf          configuration files in Mason syntax
    +-- file          all file related pages
      +-- edit        editing, saving, spelling for text files
      +-- serve       a little file server
      +-- view        viewing, rendering all files
    +-- folder        pages related mainly to triggering within a folder 
    +-- ftp           browsing of another directory, an add on example
    +-- help          help files and demo sites
    +-- image         design images
    +-- interact      profile, admin, messages and errors
    +-- script        cascading style sheet and javascript libraries 
                      should not be executed by Mason!

  +?+-- shared        MCM components which compute values. Has to be in the 
                      Mason component 'comp_root' can be in 'mason-cm' but 
                      doesn't have to. 
  +?+-- data          Writable directory (movable) doesn't have to be in 
                      component root. Best placed outside web directory 
                      and Mason component root. 
      +-- ispell      Ispell personal dictionaries (if active)
      +-- rcs         Rcs version files (if active)
      +-- trashcan    Trash can (if active)

See 'mcmRuntime.conf' to set the path of 'mason-cm', 'shared' and 'data'. 

MCM needs a granted user. Enable HTTP authentication on 'mason-cm', the 
path set in $mcm->{comp}. Because of the many user-specific features of 
MCM, $mcm->{comp} *must* be under basic authentication (access control) 
before Content Management will work. Activate this in your servers config 
file or the .htaccess file of $mcm->{comp}.

The username 'none' is reserved as the default user for mapping or ACL

MCM provides a simple user management utility. To use this feature you
need to create the file 'mcmUser.htaccess' in the MCM data directory and 
pointing to this in your httpd.conf. 

a) Edit "conf/mcmRuntime.conf"
Edit the $mcm->{comp}/conf/mcmRuntime.conf component to configure
Content Management for your machine. Out of the box, mcmRuntime.conf 
enables a minimal feature set to get MCM on its feet as painlessly as 
possible using the mcmProject.demo.conf configuring the built in demo. 
Later you can activate neato features like spell checking and version 
control. At a minimum, you'll need to set the $mcm->{data} and 
$mcm->{comp} directories.

b) Edit "conf/mcmUserProject.conf"
Maps system/.htaccess users to a project name. This is a map index telling 
wich project is loaded for the user. Use the project-name explained in
section 5) A user can belong only to one project. 

c) Edit/Create "conf/mcmProject.*.conf" (* = projectname)
Projects are set up mostly by roles. Same people working on the same 
contents see the same. An Administrator might have all branches added 
and therefore visible. Modify the branches to your needs. See comments 
in the mcmProject.*.conf. Activate features like trashcan, spell 
checking and version control to be used in this project.

d) Edit/Create "conf/mcmBranch.*.conf" (* = branchname)
For each branch used "conf/mcmProject.*.conf" there must be a 
corresponding configuration file. 

e) Edit "conf/mcmACL.conf"
That anything runs you need to set up rights here. Otherwise the user
inherits at least the basic privileges of all user '*'. 

See also: "conf/CONFIGURATION"

MCM writes to the filesystem, so the typical "nobody/nobody" httpd
u/gid setup will stop MCM in its tracks. One approach is to run a
special server just for MCM, under the same group ID as your users. 
This, combined with MCM\'sown file locking, should provide the right
mix of security and file access. You should also consider running
MCM under SSL, if you have a mod_ssl-enabled Apache server.
If you're accessing the files via FTP make sure these users are in the
same group as httpd. The best is when these users match the user logins
of Apache (.htacces). 

a) Revision Control System 
You can use as an option Rcs for versioning. 
Find source on:

b) Ispell Spell Checking
You can use as an option Ispell for spell checking. 
Find source on:

Use "make" or go the easier way to find a binary distribution 
for your system. Find rpm's on:

20.06.2003 15:12, Christian Hauser,


© 2007 Mason-CM V 1.3, Content Management built on Mason - Headquarter, CPAN