5.5. Platform Transition

The target platform must meet the following requirements: Apache 1.3.x installed MySQL 4.x.x installed PHP 4.x.x (with MySQL & LDAP support compiled) installed Sendmail installed

The platform transition process has three steps: Move files Import database structure * Modify configuration file

The first step is to move the files to the remote host. The command is shown in Example 16.

scp -r marmalade janit@madeleine.local:~/public_html/

Example 16 – Secure copy command

Once the files are moved, the database is created and the schema is loaded. The schema is included in the basic file structure (marmalade.sql). The commands shown in Example 17 are executed on the production server.

mysql> create database marmalade; Query OK, 1 row affected (0.00 sec) mysql> exit; Bye madeleine:~ janit$ mysql -u root -p marmalade < marmalade/marmalade.sql Enter password: madeleine:~ janit$

Example 17 – Database create and schema load commands

Once the database is working (set user permissions if needed), the configuration file (shown in Example 18) is opened with a text editor such as EMACS or Pico.

$today = date("d.m.Y, G.i"); $systemUrl = "http://madeleine.local/marmalade/"; $dbHost = 'localhost'; $dbUser = 'root'; $dbPass = 'password'; $dbName = 'marmalade';

Example 18 – main configuration file (config.php)

Once these steps are completed, the system is ready. Test by opening the system URL.

Encountered problems

Some minor problems due to differences in environment settings were encountered:

MySQL password format incompatibility error shown by the application

Image 6 – MySQL password format incompatibility error shown by the application