Etomite Installation
 

Etomite Upgrade

!!! PLEASE READ !!! All existing installations being upgraded require a minor database update. Once you have successfully completed the configuration file modifications listed below it is mandatory that you run the script, alter_site_content.php, before attempting to access your sites main page or entering your Etomite Manager. You can execute this script by clicking on the script name and, upon successful completion, you will be returned to this script - or you may opt to run the script independently.

Upgrading from Etomite 0.6 to Etomite 0.6.1

The fact that you are reading these instructions indicates that you have already copied the 0.6.1 files onto your server.

If you made a backup copy of your manager/includes/config.inc.php file it should be copied back to its original location. You will also need to edit your manager/includes/config.inc.php file and add the following lines so that it appears similar to the following code.


<?php
$database_type
= "mysql";
$database_server = "YourDatabaseHost";
$database_user = "YourDatabaseUsername";
$database_password = "YourDatabasePassword";
$dbase = "`YourDatabaseName`";
$table_prefix = "YourDatabaseTablePrefix";

// NO CNAGES REQUIRED BELOW THIS LINE
error_reporting(E_ALL ^ E_NOTICE);

// detect current protocol
$protocol = (isset($_SERVER["HTTPS"]) && strtolower($_SERVER["HTTPS"]) == "on") ? "https://" : "http://";

// build the absolute file path:
$cwd = (substr(PHP_OS, 0, 3) == "WIN") ? str_replace(chr(92),"/",strtolower(getcwd())) : getcwd();
$absolute_base_path = $ETOMITE_PAGE_BASE["absolute"] = $cwd."/";

// build the relative path:
$urlPieces = explode("/", $_SERVER["PHP_SELF"]);
$urlFilename = array_pop($urlPieces);
$relative_base_path = $ETOMITE_PAGE_BASE["relative"] = implode("/", $urlPieces)."/";

// build the www path:
$www_base_path = $ETOMITE_PAGE_BASE["www"] = $protocol.$_SERVER["HTTP_HOST"].$ETOMITE_PAGE_BASE["relative"];

// create an installation specific site id and session name
$site_id = str_replace("`","",$dbase)."_" . $table_prefix;
if((
$urlPieces[0]=="manager") && (substr(session_name(),-3) != "web")) {
  
$site_sessionname = $site_id . "mgr";
} else {
  
$site_sessionname = $site_id . "web";
}

// Provide session handling information
// Conceptual credit: MODx CMS ( Etomite Fork )

if(!function_exists("startCMSSession")){
  function
startCMSSession(){
    global
$site_sessionname;
    
session_name($site_sessionname);
    
session_start();
  }
}
// NO CHANGES REQUIRED BELOW THIS LINE
error_reporting(E_ALL ^ E_NOTICE);

// detect current protocol
$protocol = (isset($_SERVER["HTTPS"]) || strtolower($_SERVER["HTTPS"]) == "on") ? "https://" : "http://";

// build the absolute file path:
$cwd = (substr(PHP_OS, 0, 3) == "WIN") ? str_replace(chr(92),"/",strtolower(getcwd())) : getcwd();
$absolute_base_path = $ETOMITE_PAGE_BASE["absolute"] = $cwd."/";

// build the relative path:
$urlPieces = explode("/", $_SERVER["PHP_SELF"]);
$urlFilename = array_pop($urlPieces);
$relative_base_path = $ETOMITE_PAGE_BASE["relative"] = implode("/", $urlPieces)."/";

// build the www path:
$www_base_path = $ETOMITE_PAGE_BASE["www"] = $protocol.$_SERVER["HTTP_HOST"].$ETOMITE_PAGE_BASE["relative"];

// create an installation specific site id and session name
$site_id = str_replace("`","",$dbase)."_" . $table_prefix;
if((
$urlPieces[0]=="manager") && (substr(session_name(),-3) != "web")) {
  
$site_sessionname = $site_id . "mgr";
} else {
  
$site_sessionname = $site_id . "web";
}

// Provide session handling information
// Conceptual credit: MODx CMS ( Etomite Fork )

if(!function_exists("startCMSSession")){
  function
startCMSSession(){
    global
$site_sessionname;
    
session_name($site_sessionname);
    
session_start();
  }
}
?>

If you failed to make a backup of this file you can create it manually by cutting and pasting the code listed above or in the Phase 0.5.3 upgrade section below, editing it to conform to the proper host server settings, and saving.

The upgrade from 0.6 to 0.6.1 requires no database structure changes.

The only manual change, other than the config file mentioned above, is changing the filename of assets/cache/etomiteCache.idx to assets/cache/etomiteCache.idx.php for security reasons and failing to change this filename will result in parser errors.

It is recommended that the assets/cache/, assets/export/, and assets/images/ directories be checked to assure proper permissions. These directories must be readable and writable by Etomite. Insufficient permissions will result in parser errors when attempting to access your Etomite web pages.

If the steps listed here have been followed and settings confirmed this should complete the 0.6 to 0.6.1 upgrade process and your installation should now be fully functional.


Upgrading from Phase 0.5.3 to Etomite 0.6.1

This guide will help you to get started on upgrading your Phase 0.5.3 installation to Etomite 0.6.1.

Please note: Your Phase 0.5.3 snippets will NOT work with Etomite 0.6.1. Therefore, it is advisable not to perform these actions on a production site!

Recommendation: A lot has changed between Phase 0.5.3 and Etomite 0.6.1. Although it is possible to upgrade 0.5.3 to 0.6.1 successfully, it requires quite a bit of manual work (especially for rewriting the snippets). In fact, it's easier to install a fresh Etomite 0.6.1 site, and then to copy the site's content into that installation.

In order to prepare your 0.5.3 installation for 0.6.1, you'll need to manually run some SQL statements to upgrade the database. These SQL statements are available here. Open this file, and replace all instances of {PREFIX} with the current table_prefix used in Phase.

Once the file has been prepared, you need to run it using a tool such as phpMyAdmin. It's a good idea to do each statement seperately, although you can try to do it all at once. Please note, some of the statements may fail, this will mean that the action that statement performs isn't necessary.

Once the SQL statements have been run, your database is up to date for Etomite 0.6.1. Now we need to update the main config file. Paste the following code into manager/includes/config.inc.php, and put your own database details into it:


<?php
$database_type
= "mysql";
$database_server = "YourDatabaseHost";
$database_user = "YourDatabaseUsername";
$database_password = "YourDatabasePassword";
$dbase = "`YourDatabaseName`";
$table_prefix = "YourDatabaseTablePrefix";

// NO CHANGES REQUIRED BELOW THIS LINE
error_reporting(E_ALL ^ E_NOTICE);

// detect current protocol
$protocol = (isset($_SERVER["HTTPS"]) || strtolower($_SERVER["HTTPS"]) == "on") ? "https://" : "http://";

// build the absolute file path:
$cwd = (substr(PHP_OS, 0, 3) == "WIN") ? str_replace(chr(92),"/",strtolower(getcwd())) : getcwd();
$absolute_base_path = $ETOMITE_PAGE_BASE["absolute"] = $cwd."/";

// build the relative path:
$urlPieces = explode("/", $_SERVER["PHP_SELF"]);
$urlFilename = array_pop($urlPieces);
$relative_base_path = $ETOMITE_PAGE_BASE["relative"] = implode("/", $urlPieces)."/";

// build the www path:
$www_base_path = $ETOMITE_PAGE_BASE["www"] = $protocol.$_SERVER["HTTP_HOST"].$ETOMITE_PAGE_BASE["relative"];

// create an installation specific site id and session name
$site_id = str_replace("`","",$dbase)."_" . $table_prefix;
if((
$urlPieces[0]=="manager") && (substr(session_name(),-3) != "web")) {
  
$site_sessionname = $site_id . "mgr";
} else {
  
$site_sessionname = $site_id . "web";
}

// Provide session handling information
// Conceptual credit: MODx CMS ( Etomite Fork )

if(!function_exists("startCMSSession")){
  function
startCMSSession(){
    global
$site_sessionname;
    
session_name($site_sessionname);
    
session_start();
  }
}
?>

Now it's up to you to upgrade the snippets to work with the new Etomite 0.6.1 parser/ API. More information can be found on the Etomite site, and support is offered in the forums.

Good luck!