| Installing Xoops on 4.0-Mona |
Introduction
This step-by-step guide shows how to install Xoops on Uniform Server V4.0-Mona and resolve a portability issue.
|
Install Uniform server
Download Xoops
Copy files to Uniform Server
Still in folder xoops locate file mainfile.php and mainfile.dist.php check they are writeable if not remove read only atribute.
|
Note: These warnings:
WARNING: Directory Z:/www/xoops/install/ exists on your server. Please remove this directory for security reasons.
WARNING: File Z:/www/xoops/mainfile.php is writeable by the server. Please change the permission of this file for security reasons. in Unix (444), in Win32 (read-only)
Make above changes and refresh the page warnings no longer displayed.
Note:
You can access your site by typing the following into a browser: http://localhost/xoops/index.php
A few paths (Z:) are hard coded to make it portable let PHP automatically determine the drive letter as follows:
Edit file UniServer\udrive\www\xoops\mainfile.php (you will need to remove read only attribute)
Locate this section of code:
// XOOPS Physical Paths
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
define( 'XOOPS_ROOT_PATH', 'Z:/www/xoops' );
// For forward compatibility
// Physical path to the XOOPS library directory WITHOUT trailing slash
define( 'XOOPS_PATH', 'Z:/home/xoops_lib' );
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
define( 'XOOPS_VAR_PATH', 'Z:/home/xoops_data' );
// Alias of XOOPS_PATH, for compatibility, temporary solution
define("XOOPS_TRUST_PATH", XOOPS_PATH);
Replace with:
// XOOPS Physical Paths
$root= substr($_SERVER["DOCUMENT_ROOT"],0,-4);
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
define( 'XOOPS_ROOT_PATH', $root.'/www/xoops' );
// For forward compatibility
// Physical path to the XOOPS library directory WITHOUT trailing slash
define( 'XOOPS_PATH', $root.'/home/xoops_lib' );
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
define( 'XOOPS_VAR_PATH', $root.'/home/xoops_data' );
// Alias of XOOPS_PATH, for compatibility, temporary solution
define("XOOPS_TRUST_PATH", XOOPS_PATH);
$root= substr($_SERVER["DOCUMENT_ROOT"],0,-4); Effectively gives the drive (e.g. Z:) for virtual or disk-root installations. If installed as a service gives the path to the server root folder.
Note 1: After saving the file set it’s file attribute back to read only.
Note 2: Copy folder UniServer and all its content to a USB stick and you have fully portable Xoops server.
From the above you have seen how easy it is to install Xoops and make it fully portable.
Related links: