Home M-cube home last update: 2000-06-04

Installation instructions

Following installation procedure describes steps necessary to install the M-cube repository prototype to a computer running Windows 9x or Windows NT. The installation procedure `is similar for UNIX and other platforms, however, other platforms than Win32 are not supported this time.

Prerequisites

Download all the reqired packages from the M-cube home page:

Installation

The M-cube repository installation consists following steps:

  1. M-cube package installation
  2. Apache web server installation
  3. PHP3 installation
  4. SQL Anywhere installation
  5. ODBC data source definition
  6. M-cube selftest

STEP 1 - M-cube package installation

The M-cube repository is distributed in a ZIP archive. You should unpack the archive to some directory (e.g. c:\mcube) including file paths stored in the archive. The distribution archive contains following directories:

db
This directory contains the M-cube database and a logfile.
site
This directory contains HTML pages and PHP scripts - the M-cube repository implementation.
sql
This directory contains SQL script generating an empty database.
svr_back
This directory contains Apache and PHP3 configuration files backup and a backup script.

All the following examples presume that the M-cube package is installed in the c:\mcube directory.

STEP 2 - Apache web server installation

Run Apache setup and install the web server to preferred directory.

For example: c:\mcube\apache

Now you should to configure your Apache web server to run properly on your machine. To do this open file c:\mcube\apache\conf\httpd.conf and proceed following changes:

****** original
   138:  #
   139:  ThreadsPerChild 50
   140:  
****** change to
   138:  #
   139:  ThreadsPerChild 5
   140:  
******

****** original
   231:  #
   232:  #ServerName new.host.name
   233:  
****** change to
   231:  #
   232:  ServerName <your_host_name>
   233:  
******

****** original
   448:  Alias /icons/ "C:/develo/apache/icons/"
   449:  
****** add line
   448:  Alias /icons/ "C:/develo/apache/icons/"
   449:  Alias /site/ "c:/mcube/site/"
   450:  
******

Run Apache web server from Start menu.

Run your web browser and try type http://localhost, you should see the Apache welcome screen.

Try also http://localhost/site/index.html, you should see The M-cube home page.

Shut down Apache web server (from Start menu).

STEP 3 - PHP3 installation

Unpack the PHP3 archive to chosen directory (e.g. c:\mcube\php).

Copy c:\mcube\php\php3.ini-dist to your Windows directory and change target file name from php3.ini-dist to php3.ini.

Proceed following changes in php3.ini:

****** original
   102:  upload_max_filesize = 2097152  ; 2 Meg default limit on file uploads
   103:  extension_dir   =       ./     ; directory in which the loadable extensions (modules) reside
   104:  
****** change extension_dir variable
   102:  upload_max_filesize = 2097152  ; 2 Meg default limit on file uploads
   103:  extension_dir   =       c:\mcube\php ; directory in which the loadable extensions (modules) reside
   104:  
******

****** original
    71:  log_errors		=	Off	; Log errors into a log file (server-specific log, stderr, or error_log (below))
    72:  track_errors	=	Off	; Store the last error/warning message in $php_errormsg (boolean)
    73:  ;error_prepend_string = "<font color=ff0000>"   ; string to output before an error message
****** change track_errors switch (line 72)
    71:  log_errors		=	Off	; Log errors into a log file (server-specific log, stderr, or error_log (below))
    72:  track_errors	=	On	; Store the last error/warning message in $php_errormsg (boolean)
    73:  ;error_prepend_string = "<font color=ff0000>"   ; string to output before an error message
******

You have to add PHP3 file type alias to the Apache configuration file. Open c:\mcube\apache\conf\httpd.conf again and proceed the following change (lines 470-472).

 465 <Directory "C:/mcube/apache/cgi-bin">
 466     AllowOverride None
 467     Options None
 468 </Directory>
 469 
 469 
 470 ScriptAlias /php3/ "c:/mcube/php/" 
 471 AddType application/x-httpd-php3 .php3 .php .phtml
 472 Action application/x-httpd-php3 "/php3/php.exe"
 473 

STEP 4 - SQL Anywhere installation

Unzip SQL Anywhere archive and proceed setup.

STEP 5 - ODBC data source definition

Add a new data source to "User DSN" pane.

Configure the data source according to the example below:

ODBC source configuration

STEP 6 - M-cube selftest

Run Apache web server from Start menu again and type http://localhost/site/index.html. You should see the M-cube home page.

Scrool down to the M-cube self-test and follow instructions.

Troubleshooting

In case it does not work, try to isolate the problem. The M-cube self test page can help you with the problem analysis. You should be sure that all the components (web server, PHP3 processor, SQL database, M-cube) are properly configured and are able to run standalone first. Then you can try to run them alltogether.

If you have any questions, contact the author.

- END -


Jaroslav Gergic