Installation Requirements:
Mantis BT zip files
PHP zip and installer files
MS SQL (or MySQL with GUI tools like MySQL admin)
PHPMailer
- Install PHP: 5.2.8 (installation link):
I used the installer (php-5.2.8-win32-installer.msi) first and then the zip file (php-5.2.8-Win32.zip). PHP extension DLL files (php_mysql.dll or php_mssql.dll) are present in the zip file only. Installed on C:\php\ and also put it on path. Also had to put the C:\php\ext\ on path. Restart web server (at least IIS service).
For configuring PHP with IIS, For 'Default web sites' (not 'mantisbt') do:
In diretory tab, within configuration, add executable 'c:\php\php-cgi.exe' for extension '.php'. Uncheck 'cache isapi extensions' (not sure). For windows server, allow all unknown CGI extensions in IIS - web service extensions is a workaround as a potential security risk.
For configuring PHP with IIS, there are two options: CGI binary (php-cgi.exe in php5) and ISAPI module (php.exe in php5). A server in CGI mode is open to potential security risks so it is fine for intranet use only. A few CGI directives are to be set in php.ini.
For php with CGI binary, for 'Default web sites' (not 'mantisbt') do:
For php with CGI binary, for 'Default web sites' (not 'mantisbt') do:
In diretory tab, within configuration, add executable 'c:\php\php-cgi.exe' for extension '.php'. If php is not running still, 'Allow all unknown CGI extensions' in IIS - web service extensions is a workaround but a potential security risk for windows server.
For php using ISAPI module, for 'Default web sites' (not 'mantisbt') do:
For php using ISAPI module, for 'Default web sites' (not 'mantisbt') do:
In diretory tab, within configuration, add executable 'c:\php\dlls\php5isapi.dll' for extension '.php'. Add 'c:\php\dlls\php5isapi.dll' as a web service extension in IIS and allow it. For windows server 64-bit, enable 32-bit applications (on command line - cSCRIPT ADSUTIL.VBS SET W3SVC/AppPools/Enable32bitAppOnWin64 1).
Move php.ini to c:\windows.
php.ini configuration (or place the backed up php.ini file):
[PHP]
extension=php_mssql.dll
include_path (either put it here or in the path variable)
upload_tmp_dir (not sure) and upload_max_filesize (default 2MB)
cgi.force_redirect = 0 (turned off)
[mail function]
SMTP = mail.domainname.domain (for email integration like PHPMailer)
[MSSQL]
mssql.textlimit and mssql.textsize
Check if PHP is installed properly (create phpinfo.php and put <?php phpinfo(); ?>)
- Install MS SQL (or MySQL):
Using MS SQL experimental for mantis. Create the Mantis database and create a system mantis user with access to it. Configure settings in mantis\config_inc.php which overrides the settings in file mantis\config_defaults_inc.php (below). Install the Mantis scripts which creates the tables in the database.
$g_hostname = "somehostname";
$g_db_username = "someuser";
$g_db_password = "somepassword";
$g_database_name = "somedatabase";
$g_db_type = "mssql";
Check if PHP can see the required dll (php_mssql.dll) by putting this in a php file:
<?php if (function_exists('mssql_connect')) echo "GOOD"; else echo "BAD"; ?>
- MantisBT files (manual link):
Mantis 1.1.6 (mantisbt-1.1.6.zip).
Unzip to mantis directory on C:\Inetpub\wwwroot\. In Diretory tab, create application name directory. In Documents tab, add index.php to default document.
Check mantis website. Run the mantis scripts for creating tables in the Mantis BT database.
With this, the mantis should display a login page at least (as PHP is working and MS SQL dll is visible too).
- Install Email (PHPMailer):
Using PHPMailer (2.3). Installation is very simple - put required files in the php\includes directory and putting that directory on the path (follow README).
- Mantis admin console:
There is a /admin directory for checking, upgrading, system utilities etc. which needs to be deactivated after. The administrator account needs to be changed (do not remove without giving someone else admin rights :D). Checking installation displays a few settings in the php.ini file. The file uploads section might need tweaking. The testing smtp email would tell if phpmailer is installed correctly.
With this, mantis should be able to send an email with link for new users for account verification and setup. Remove the directory once done.
- File Uploads (file upload link):
For allowing and increasing the file upload limits, there are more than one places to do it and the effective limit is the lesser of all values.
php.ini
$g_max_file_size
post_max_size
upload_max_filesize
mantis's config_inc.php
$g_max_file_size
- Backups:
With MS SQL, the database backups can be configured. I normally back up the php.ini file, config_inc.php file, or the whole installation directory etc. More on this later.
Current Mantis configuration:
Mantis 1.1.6
PHP 5.2.8
MS SQL 2005 (9.0)
PHPMailer 2.3
Note:
Previous Mantis configuration (circa 2005)
Mantis 1.0.0a1
PHP 4.3.11
MySQL 4.1.11 with MySQL admin 1.0.20
PHPMailer 1.65
For some reason, I could not get the backups to work properly using mysqldump. So I would schedule a script using task scheduler to create the backup (using MySQLAdministrator.exe) and move the backup file over to a network share.
PS: prone to update
Updated in blue.
No comments:
Post a Comment