Developing New Paths - The Mojavi Project

Posts Tagged ‘Webserver directory index’

Technology

September 19, 2009

CMS Software to maximize your customer experience

Tags: , , ,

Those in the IT and programming field understand the value enterprise content management and what that can ultimately mean to an organization on the overall company vision and engagement with their external and internal customers. Through the open development of platforms like Mojavi this collaboration has enabled people from across the globe to contribute in developing a platform that can be used in various business and web functions in order to facilitate customer engagement.

customer managementWhen you have the Mojavi 3 source, it should come with this directory structure:

root
|
|—config
|
|—phing
|
|—php_documentor
|
|—source
| |
| |—mojavi
| |
| |—webapp
| |
| |—www
|
|—sql

Here is a brief explination of each of the directories

* config – sample configuration files
* phing – phing scripts (learn more about phing here )
* php_documentor – templates for generating Mojavi API docs php Documentor website
* source – all the source files
* source/mojavi – the core Mojavi source
* source/webapp – your web application
* source/www – web accessible files
* sql – sql sample files

Installation Steps:
Moving the Mojavi Source

First, move the source/mojavi directory to a non web accessible location, preferrably the parent directory of your root web directory. On most installations this would be the parent directory of your public_html or www directory. On a Windows Apache, this would probably be the parent of the htdocs directory. Move the entire contents of the mojavi directory (including the mojavi folder)
Setting up the webapp

Move the source/webapp directory to a non web accessible location, preferrably the parent directory of your root web directory, which should now have a mojavi directory. Next, give your webapp/cache directory full write permissions. In unix you can type “chmod 777 cache”. On Windows you must go through your webserver to give it write permissions.

You must configure your webapp/config.php configuration file.

There are two lines you need to change

// +—————————————————————————+
// | An absolute filesystem path to the mojavi library. This directory |
// | contains all the Mojavi packages. |
// +—————————————————————————+
define(‘MO_APP_DIR’, ‘/mojavi’);

// +—————————————————————————+
// | An absolute filesystem path to your web application directory. This is |
// | where modules are stored. |
// +—————————————————————————+
define(‘MO_WEBAPP_DIR’, ‘/webapp’);

Replace DIRECTORY with the web directory. Under Linux, it may look like /home/username/. Under Windows (with Apache) it may look like c:/apache/

Here’s the final code

// +—————————————————————————+
// | An absolute filesystem path to the mojavi library. This directory |
// | contains all the Mojavi packages. |
// +—————————————————————————+
define(‘MO_APP_DIR’, ‘/home/username/mojavi’);

// +—————————————————————————+
// | An absolute filesystem path to your web application directory. This is |
// | where modules are stored. |
// +—————————————————————————+
define(‘MO_WEBAPP_DIR’, ‘/home/username/webapp’);

Final Step

Move the index.php file in the source/www directory to your root web directory (the public_html, www or htdocs directory). This file must be accessible from the web. Any location that is accessible via the web will do.

Now you need to configure your web directory’s index.php file that you just moved.

// +—————————————————————————+
// | An absolute filesystem path to our webapp/config.php script. |
// +—————————————————————————+
require_once(‘INSERT PATH TO “webapp/config.php” HERE’);

// +—————————————————————————+
// | An absolute filesystem path to the mojavi/mojavi.php script. |
// +—————————————————————————+
require_once(‘INSERT PATH TO “mojavi/mojavi.php” HERE’);

The same directory rules apply here as with the config.php file. Here’s the results

// +—————————————————————————+
// | An absolute filesystem path to our webapp/config.php script. |
// +—————————————————————————+
require_once(‘/home/username/webapp/config.php’);

// +—————————————————————————+
// | An absolute filesystem path to the mojavi/mojavi.php script. |
// +—————————————————————————+
require_once(‘/home/username/mojavi/mojavi.php’);

Success

You’re done. Try accessing your index.php file from the web.

Reblog this post [with Zemanta]