@phileas,
yep feel free to beuatify, can only help the community
Multiple sites, one installation
Moderators: Developer, Contributor
Re: Multiple sites, one installation
Thanks, it looks much better like this
Re: Multiple sites, one installation
Agreed much better, formatting makes all the difference.
-
- Posts: 1
- Joined: 15 Feb 2011, 15:08
Re: Multiple sites, one installation
Oh yeah!! That's neat! Thanks!
Re: Multiple sites, one installation
There is one other area which needs to be addressed which is the reference within Mantis to custom_strings_inc.php.
In the current setup it is assumed that these would be the same for all instances running of that singel install. This clearly is not de facto true.
Good news is that it is not a real issue anyway
This can be handled pretty easily, exactly in the same way as for the base config !!
Just move your custom strings into an instance dependent file caklled custom_strings_mantis1.php and so on.
Then your custom_strings_inc.php would look like :
<?php
// ******************************************************************************************
// * *
// * HTTP_HOST is used to determine the config file needed for webservices *
// * SCRIPT_NAME is used to determine the config file needed for commandline services *
// * *
// ******************************************************************************************
$hostheader = $_SERVER['HTTP_HOST'];
$mailscript = $_SERVER['SCRIPT_NAME'];
switch ($hostheader) {
case "mantis1.yourdomainl.com" :
include('custom_strings_mantis1.php');
break;
case "mantis2.yourdomainl.com" :
include('custom_strings_mantis2.php');
break;
}
switch ($mailscript){
case "read_mail_mantis1.php" :
include('custom_strings_mantis1.php');
break;
case "read_mail_mantis2.php" :
include('custom_strings_mantis2.php');
break;
}
The same applies for the custom_constants_inc.php
@phileas,
did not add that to the wiki, did not want to screw up your very nice lay-out . So please add the above to the Howto.
In the current setup it is assumed that these would be the same for all instances running of that singel install. This clearly is not de facto true.
Good news is that it is not a real issue anyway
This can be handled pretty easily, exactly in the same way as for the base config !!
Just move your custom strings into an instance dependent file caklled custom_strings_mantis1.php and so on.
Then your custom_strings_inc.php would look like :
<?php
// ******************************************************************************************
// * *
// * HTTP_HOST is used to determine the config file needed for webservices *
// * SCRIPT_NAME is used to determine the config file needed for commandline services *
// * *
// ******************************************************************************************
$hostheader = $_SERVER['HTTP_HOST'];
$mailscript = $_SERVER['SCRIPT_NAME'];
switch ($hostheader) {
case "mantis1.yourdomainl.com" :
include('custom_strings_mantis1.php');
break;
case "mantis2.yourdomainl.com" :
include('custom_strings_mantis2.php');
break;
}
switch ($mailscript){
case "read_mail_mantis1.php" :
include('custom_strings_mantis1.php');
break;
case "read_mail_mantis2.php" :
include('custom_strings_mantis2.php');
break;
}
The same applies for the custom_constants_inc.php
@phileas,
did not add that to the wiki, did not want to screw up your very nice lay-out . So please add the above to the Howto.
Re: Multiple sites, one installation
we found a lot of error messages (type notify) in the php errorlog after this change.
The reason being that we also use the commandline feature and then clearly there is no hostheader.
In order to avoid the messages, the config_inc.php needs to be adjusted as follows :
Initially there was no condition given for reading of the hostheader.
The reason being that we also use the commandline feature and then clearly there is no hostheader.
In order to avoid the messages, the config_inc.php needs to be adjusted as follows :
Code: Select all
if (isset($_SERVER['HTTP_HOST'])) {
$hostheader = $_SERVER['HTTP_HOST'];
}
Re: Multiple sites, one installation
Hi cas
please have a look at http://www.mantisbt.org/wiki/doku.php/m ... stallation in section Examples.
can you correct the source of config_inc.php, i do not know where you made this change.
or let me know what you exactly mean, how it should be coded.
please have a look at http://www.mantisbt.org/wiki/doku.php/m ... stallation in section Examples.
can you correct the source of config_inc.php, i do not know where you made this change.
or let me know what you exactly mean, how it should be coded.
Re: Multiple sites, one installation
Phileas,
documentation adjusted. Manged to do that without damaging the lay-out
documentation adjusted. Manged to do that without damaging the lay-out