1,478
edits
mNo edit summary |
|||
Line 152: | Line 152: | ||
Related: | Related: | ||
'''''[[#top | Top]]''''' | |||
==== Potential problem and solution ==== | |||
After publishing I discovered during installation a few paths are hard coded. Unless it is the first server to be started these absolute paths prevent this server running alongside other mini-servers. Should this be an issue apply the following fix: | |||
Edit '''server_start.bat''' add the last two lines shown just below the first two. | |||
<pre> | |||
rem ## Save drive letter to file. Used by stop bat | |||
(set /p dummy=%Disk%) >udrive\usr\local\apache2\logs\drive.txt <nul | |||
rem ## Save drive letter to file. Used by Xoops to resolve absolute paths | |||
(set /p dummy=%Disk%) >udrive\www\xoops\drive.php <nul | |||
</pre> | |||
This creates a file in Xoops folder and writes the current virtual drive letter to it. | |||
Edit file '''mainfile.php''' found in the '''xoops folder''' (you will need to remove read only attribute) | |||
Add the small block (three lines) of code to read content of file drive.php. The variable $vdrive now contains the current virtual drive letter. | |||
Replace every occurrence of drive letter “Z” with the variable $vdrive as show in the lines outdented. | |||
<pre> | |||
define("XOOPS_MAINFILE_INCLUDED", 1); | |||
//===== MPG ======= | |||
$fh = fopen("", 'r'); // Open file | |||
$vdrive = fread($fh, 1); // Read first character | |||
fclose($fh); // Close file | |||
// XOOPS Physical Paths | |||
// Physical path to the XOOPS documents (served) directory WITHOUT trailing slash | |||
//define( 'XOOPS_ROOT_PATH', 'Z:/www/xoops' ); | |||
define( 'XOOPS_ROOT_PATH', $vdrive.':/www/xoops' ); | |||
// For forward compatibility | |||
// Physical path to the XOOPS library directory WITHOUT trailing slash | |||
//define( 'XOOPS_PATH', 'Z:/home/xoops_lib' ); | |||
define( 'XOOPS_PATH', $vdrive.':/home/xoops_lib' ); | |||
// Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash | |||
//define( 'XOOPS_VAR_PATH', 'Z:/home/xoops_data' ); | |||
define( 'XOOPS_VAR_PATH', $vdrive.':/home/xoops_data' ); | |||
</pre> | |||
'''''Note'':''' After saving the file set it’s file attribute back to '''read only'''. | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
---- | ---- |