1,478
edits
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<span id="top"></span> | <span id="top"></span> | ||
{| cellpadding="2" | {| cellpadding="2" | ||
|__TOC__||'''Installing Xoops on 5 | |__TOC__||'''Installing Xoops on 5-Nano Series''' | ||
|} | |} | ||
'''Introduction''' | '''Introduction''' | ||
This step-by-step guide shows how to install Xoops on Uniform Server V5 | This step-by-step guide shows how to install Xoops on Uniform Server V5-Nano and resolve a portability issue. | ||
After installation you can optionally move the servers to non-standard ports allowing | After installation you can optionally move the servers to non-standard ports allowing UniServer to coexist with a server running on standard ports. | ||
== Pre-Installation == | == Pre-Installation == | ||
Line 153: | Line 153: | ||
<pre> | <pre> | ||
// XOOPS Physical Paths | // XOOPS Physical Paths | ||
// === Set base path ======================================================== | |||
$path_array = explode("www", dirname( __FILE__ )); // Split pat at www | |||
$base = "$path_array[0]"; // absolute path to ..UniServer/ | |||
// ===================================================== End Set base path === | |||
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash | // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash | ||
Line 246: | Line 248: | ||
* Under '''Plugins''' | * Under '''Plugins''' | ||
* Navigate to sub-folder '''Uniform Server 5-Nano Plugins''' | * Navigate to sub-folder '''Uniform Server 5-Nano Plugins''' | ||
* Download file [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/Applications/V55_Xoops/ | * Download file [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/Applications/V55_Xoops/V55_Xoops_2_4_2a.exe/download V55_Xoops_2_4_2a.exe] | ||
Save this to folder UniServer, to install double click on file. Xoops is pre-configured and ready to go. Check out the read me file for latest information. | Save this to folder UniServer, to install double click on file. Xoops is pre-configured and ready to go. Check out the read me file for latest information. | ||
'''''Note'':''' This plugin is intended to quickly get Xoops up and running allowing you to explore the software. If you intend running a production server delete the folders installed and perform a manual install this allows you to tailor Xoops and include any missing modules. | '''''Note'':''' This plugin is intended to quickly get Xoops up and running allowing you to explore the software. If you intend running a production server delete the folders installed and perform a manual install this allows you to tailor Xoops and include any missing modules. | ||
=== Plugin modifications === | |||
The plugin includes changes for absolution paths and automatic port detection | |||
The following section was added: | |||
{| | |||
|- | |||
| | |||
<pre> | |||
// === Set base path ========================================================== | |||
$path_array = explode("www", dirname( __FILE__ )); // Split pat at www | |||
$base = "$path_array[0]"; // absolute path to ..UniServer/ | |||
// ====================================================== End Set base path === | |||
// === Get MYSQL port ========================================================= | |||
// Use port from configuration file - because user can change this file | |||
$file_conf = $base.'usr\\local\\mysql\\my.ini'; // Config file | |||
if ($filearray=file($file_conf)) { // read file into array | |||
foreach ($filearray as $txt) { // scan array for port | |||
if(preg_match("/^\s*port\s*=\s*(\d+)/", $txt,$match)){ // check save matches | |||
$mysql_port = $match[1]; // match found save port number | |||
break; // give up nothing else to do | |||
} | |||
} | |||
} | |||
else { // failed to read file | |||
echo "Cannot read the file"; | |||
} | |||
// ===================================================== END Get MySQL Port === | |||
// === Get Apache port ======================================================== | |||
// Use port from configuration file - because user can change this file | |||
$file_conf = $base.'usr\\local\\apache2\\conf\\httpd.conf'; // Config file | |||
if ($filearray=file($file_conf)) { // read file into array | |||
foreach ($filearray as $txt) { // scan array for port | |||
if(preg_match("/^\s*Listen\s*(\d+)/", $txt,$match)){ // check save matches | |||
$apache_port = $match[1]; // match found save port number | |||
break; // give up nothing else to do | |||
} | |||
} | |||
} | |||
else { // failed to read file | |||
echo "Cannot read the file"; | |||
} | |||
// ======================================================= Get Apache Port === | |||
</pre> | |||
|} | |||
The following section was changed as shown: | |||
{| | |||
|- | |||
| | |||
<pre> | |||
// XOOPS Physical Paths | |||
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash | |||
define( 'XOOPS_ROOT_PATH', $base.'www/xoops' ); | |||
// For forward compatibility | |||
// Physical path to the XOOPS library directory WITHOUT trailing slash | |||
define( 'XOOPS_PATH', $base.'home/xoops_lib' ); | |||
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash | |||
define( 'XOOPS_VAR_PATH', $base.'home/xoops_data' ); | |||
// Alias of XOOPS_PATH, for compatibility, temporary solution | |||
define("XOOPS_TRUST_PATH", XOOPS_PATH); | |||
</pre> | |||
|} | |||
The following section was changed as shown: | |||
{| | |||
|- | |||
| | |||
<pre> | |||
// XOOPS Virtual Path (URL) | |||
// Virtual path to your main XOOPS directory WITHOUT trailing slash | |||
// Example: define('XOOPS_URL', 'http://localhost/xoops'); | |||
define('XOOPS_URL', "http://localhost:$apache_port/xoops"); | |||
</pre> | |||
|} | |||
The following section was changed as shown: | |||
{| | |||
|- | |||
| | |||
<pre> | |||
// Database Hostname | |||
// Hostname of the database server. If you are unsure, "localhost" works in most cases. | |||
define('XOOPS_DB_HOST', "localhost:$mysql_port"); | |||
</pre> | |||
|} | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' |