Sleek Action Edit | SourceForge - PHP - Freshmeat - Gibson Research - Ubuntu Linux - Clusty Search - Babel Fish Translation - WordReference Dictionaries - Wiktionary - ASP
php.MVC, The Model View Controller Framework for PHP Web Applications
  Free OpenSource Downloads
The Model View Controller Framework for PHP Web Applications
 
spacer Features •  Demos •  Docs •  Design •  Download •  CVS •  Support •  Developers

spacer
Installation.

MS Windows Installation

1) Copy the phpmvc-beta-xxx.zip archive to the Web server (SCP/FTP)

2) Unpack the tarball zip

  •  SSH to the Web server

  •  Change to the directory where phpmvc will live. Eg: C:\WWW\

  •  Backup/move any existing phpmvc directory. Eg: C:\WWW\phpmvc-BAK

  •  Unzip the phpmvc-beta-xxx.zip archive to the target directory.
      Eg: C:\WWW\phpmvc

  •  Remove the phpmvc-beta-xxx.zip tarball [optional]

3) Setup the Simple Example application

  •  Move into the main phpmvc directory. Eg: C:\WWW\phpmvc

  •  Set the Simple Example application root and module directory in Main.php
   Note: These paths are absolute file-system paths.
   Note: In this case the paths are the same as Simple Example Main.php file is in the php.MVC root directory.

  /* ---------- Application Paths ---------- */
  // Set php.MVC library root directory
  $appServerRootDir = 'C:/WWW/phpmvc'; // no trailing slash

  // Set the application path
  $moduleRootDir = 'C:/WWW/phpmvc'; // no trailing slash
  /* ---------- Application Paths ---------- */
  
  •  Enable write permission on the WEB-INF/phpmvc-config.data file.
   Note: The Web server must have write permission on WEB- INF/phpmvc-config.data file
   Note: The WEB-INF/* directory tree should be accessable ONLY by localhost per .htaccess file
   Note: If you have admin access to the server, change the phpmvc-config.data file to be writable
   by the Web server group for added security.

4) Setup the OOHForms demo module

  •  Move into the OOHForms demo module directory. Eg: C:\WWW\phpmvc\oohforms

  •  Set the OOHForms demo application root and module directory in Main.php
   Note: These paths are absolute file-system paths.
  /* ---------- Application Paths ---------- */
  // Set php.MVC library root directory
  $appServerRootDir = 'C:/WWW/phpmvc'; // no trailing slash

  // Set the application path
  $moduleRootDir = 'C:/WWW/phpmvc/oohforms'; // no trailing slash
  /* ---------- Application Paths ---------- */
  
  •  Enable write permission on the WEB-INF/phpmvc-config.data file for this application.
   Note: As above

5) Test Web access to WEB-INF/*

  •  There should be NO access or directory listing to WEB-INF/* in the main or sub application.

6) Test the basic php.MVC framework demos

  •  The Simple Example:
    Browse to your install directory, with the path "do=stdLogon".
     Eg: http://myserver.com/phpmvc/Main.php?do=stdLogon

  •  The OOHForms demo:
    Browse to the phpmvc/oohforms/index.php file and follow the links.

7) Troubleshooting

  •  If all you get is file path errors, please try setting the $osType variable in the Main.php files to the correct server OS.
    Eg: $osType = 'WINDOWS';

Installation.

Linux (Redhat) Installation

1) Copy phpmvc-beta-xxx.tgz to the Web server (FTP)

2) Unpack the tarball

  •  SSH to the Web server

  •  Change to the directory where phpmvc will live.
     bash$ cd www

  •  Backup/move any existing phpmvc directory
     bash$ mv phpmvc phpmvc-BAK

  •  Create the phmmvc directory and unpack archive
     bash$ tar xvzf phpmvc-20021126.tgz

  •  Remove the phpmvc-beta-xxx.tgz tarball [optional]
     bash$ rm phpmvc-beta-xxx.tgz

3) Setup the Simple Example application

  •  Move into the main phpmvc directory
     bash$ cd phpmvc
     Check the path to the phpmvc root directory ($appServerRootDir)
     bash$ pwd (/home/myhome/www/phpmvc)

  •  Set the Simple Example application root and module directory in Main.php
   Note: These paths are absolute file-system paths.
   Note: In this case the paths are the same as Simple Example Main.php file is in the php.MVC root directory.

  /* ---------- Application Paths ---------- */
  // Set php.MVC library root directory
  $appServerRootDir = '/home/myhome/www/phpmvc'; // no trailing slash

  // Set the application path
  $moduleRootDir = '/home/myhome/www/phpmvc'; // no trailing slash
  /* ---------- Application Paths ---------- */
  
  •  Enable write permission on the phpmvc-config.data file.
     bash$ chmod o+w WEB-INF/phpmvc-config.data (*** world writable ***)

     Note: The Web server must have write permission on WEB- INF/phpmvc-config.data file
     Note: The WEB-INF/* directory tree should be accessable ONLY by localhost per .htaccess file
     Note: If you have root access to the server, change the phpmvc-config.data file to be writable
     by the Web server group for added security.
     bash$ chmod g+w WEB-INF/phpmvc-config.data
     root# chgrp apachegroup WEB-INF/phpmvc-config.data

4) Setup the OOHForms demo module

  •  Move into the OOHForms demo module directory
     bash$ cd oohforms

  •  Set the main application root directory in Main.php
     bash$ vi Main.php

  •  Set the OOHForms demo application root and module directory in Main.php
  /* ---------- Application Paths ---------- */
  // Set php.MVC library root directory
  $appServerRootDir = '/home/myhome/www/phpmvc'; // no trailing slash

  // Set the application path
  $moduleRootDir = '/home/myhome/www/phpmvc/oohforms'; // no trailing slash
  /* ---------- Application Paths ---------- */
  
  •  Enable write permission on the phpmvc-config.data file
     bash$ chmod o+w WEB-INF/phpmvc-config.data (*** world writable ***)
     Notes: As above

5) Test Web access to WEB-INF/*

  •  There should be NO access or directory listing to WEB-INF/* in the main or sub application.

6) Test the basic php.MVC framework demos

  •  The Simple Example:
    Browse to your install directory, with the path "do=stdLogon".
     Eg: http://myserver.com/phpmvc/Main.php?do=stdLogon

  •  The OOHForms demo:
    Browse to the phpmvc/oohforms/index.php file and follow the links.

7) Troubleshooting

  •  If all you get is file path errors, please try setting the $osType variable in the Main.php files to the correct server OS.
    Eg: $osType = 'UNIX';


Printable Page
spacer

SleeK Action Edit - Code Editor for Windows PHP Logo php.MVC Logo SourceForge
Copyright © 2006 John C. Wildenauer. All rights reserved.