Bug Managment

Bug Management Introduction

Mantis

mysql installation

install with source

download mysql-5.0.51b.tar.gz source from mysql home page

./configure --prefix=/usr/local \
           --localstatedir=/usr/local/mysql/data
make install

install with compiled binary

download binary from mysql homepage

[http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a-linux-i686-icc-glibc23.tar.gz/from/http://mirror.mysql-partners-jp.biz/]

extract and setup
shell> groupadd mysql
    shell> useradd -g mysql mysql
    shell> cd /usr/local
    shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
    shell> ln -s full-path-to-mysql-VERSION-OS mysql
    shell> cd mysql
    shell> scripts/mysql_install_db --user=mysql
    shell> chown -R root  .
    shell> chown -R mysql data
    shell> chgrp -R mysql .
start the server
shell> bin/mysqld_safe --user=mysql &
test
shell> bin/mysqladmin version
    shell> bin/mysqladmin variables
    bin/mysqlshow
shutdown
bin/mysqladmin -u root shutdown
set root password
shell> mysql -u root
    mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('the password');
    mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('the password');

apache installation

download tag.gz

./configure
make install

php installation

download source package php-5.2.3.tar.gz

[http://downloads.php.net/ilia/]

install with both oracle and mysql support

./configure \
      --with-oci8-instant-client \
      --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs \
      --with-config-file-path=/usr/local/apache/conf \
      --with-oci8=$ORACLE_HOME \
      --with-mysql=/usr/local/mysql \
      --with-zlib-dir=/usr
make install

ps. make sure apache startup user can access oracle
(add the user to oracle group and setup the variables)

configure with apache

configure php.ini
configure apache

AddType application/x-httpd-php        .php
AddType application/x-httpd-php-source .phps

LoadModule php5_module        modules/libphp5.so

<VirtualHost *:1500>
ServerName <servername>
DocumentRoot "/var/httpd/htdocs/virtualhost"
</VirtualHost>

put a test page phpinfo.php on virtual host and test it

<?php phpinfo() ?>

http://localhost:1500/phpinfo.php

Mantis installation

download mantis-1.2.0a1.tar.gz from mantis homepage

extract mantis-1.2.0a1.tar.gz

tar -zxvf mantis-1.2.0a1.tar.gz

alter mysql root password.

open browser
http://localhost/mantis-1.2.0a1/admin/index.php
http://localhost/mantis-1.2.0a1/admin/install.php

enter all the information.

OK. you can just open http://localhost/mantis-1.2.0a1/index.php and login with Administrator/root

Advanced configuration

open config_inc.php mantis home dir, you will found the following text.

<?php
        $g_hostname = false;
        $g_db_type = 'mysql';
        $g_database_name = 'mantis';
        $g_db_username = 'mantisuser';
        $g_db_password = 'mantispassword';
        $g_default_language= 'japanese';
?>

Bug and Problem

mantis based on php adodb and supports many databases including the best production database oracle and db2.
but I found they hadn't run test on oracle at all!

I resolved several problems and found several tables name are over 30 chars, so the system cannot run on oracle at all just for this small mistake! I hope mantis team fix the problem.

I did the following modification to make mantis installation support oracle.

#config_inc.php
<?php
        $g_hostname = false;
        $g_db_type = 'oci8';
        $g_database_name = 'orclptm';
        $g_db_username = 'mantis';
        $g_db_password = 'hikari';
        $g_default_language= 'japanese';
?>
 
#admin/install.php part 1
<?php
 
        $t_config_filename = $g_absolute_path . 'config_inc.php';
        $t_config_exists = file_exists ( $t_config_filename );
        $f_hostname = null; $f_db_type = null; $f_database_name = null; $f_db_username = null; $f_db_password = null;
        if ( $t_config_exists ) {
                if ( 0 == $t_install_state ) {
                        print_test("Config File Exists - Upgrade", true);
                }
                #config already exists - probably an upgrade
 
                $f_dsn = config_get( 'dsn', '' );
                # 2008/06/17 f.yang
                $f_hostname = config_get( 'hostname', false );
                # the original line: $f_hostname = config_get( 'hostname', '' );
                $f_db_type = config_get( 'db_type', '' );
                $f_database_name = config_get( 'database_name', '');
                $f_db_username = config_get( 'db_username', '' );
                $f_db_password = config_get( 'db_password', '' );
 
#admin/install.php part 2
<!-- connect to db -->
<tr>
        <td bgcolor="#ffffff">
                Attempting to connect to database as admin
        </td>
        <?php
        $t_db_open = false;
                $g_db = ADONewConnection($f_db_type);
                # 2008/06/17 f.yang
                if ($f_db_type == 'oci8') {
                        $t_result = @$g_db->Connect($f_hostname, $f_admin_username, $f_admin_password, $f_database_name);
                } else {
                        $t_result = @$g_db->Connect($f_hostname, $f_admin_username, $f_admin_password);
                }
 
                if ( $t_result ) {
                        # check if db exists for the admin
                        $t_result = @$g_db->Connect($f_hostname, $f_admin_username, $f_admin_password, $f_database_name);
                        if ( $t_result ) {
                        $t_db_open = true;
                                $f_db_exists = true;
                        }
page_revision: 5, last_edited: 1213702515|%e %b %Y, %H:%M %Z (%O ago)