0

Steps to connect mantis BT with Oracle database are as follows :

Xampp settings:

  1. Install Xampp 1.7.3 or above on your windows OS.

  2. Download InstantClient and extract folder to C:\instantclient folder

  3. Set Environment variable : Start Menu > My Computer(right click on the icon) > Select Properties > Advanced Tabs > Environment Variables. Add to ‘System Variables’ by clicking ‘New’ button and insert the following values: a. Variable Name : PATH

    b. Variable Value : c:\instantclient

  4. Search for string "oci8" in xampp\php\php.ini and uncomment them.

  5. Restart you laptop/pc to accept new modification on xampp.

Mantis code settings:

  1. config_inc.php : Change the parameter values for oracle db.

    $g_hostname = 'ip:port/databasename';

    $g_db_type = 'oci8';

    $g_database_name = 'databasename';

    $g_db_username = 'schema_name';

    $g_db_password = 'schema_password';

  2. database_api.php :

    Create a function for oracle connection:

    function connectToDatabase()
     {
          $username = 'schema_name';
          $password = 'schema_password';
          $ora_host='(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(HOST = your_ip_address)(PORT = your_port_number))(CONNECT_DATA =(SID = your_database_name)))';
          $connect = ocilogon($username, $password, $ora_host);
          return $connect;
    

    }

  3. Change every existing MySql queries to Oracle queries in every files.

Sample:

$query = "Select * from mantis_user_table where username='administrator'" ;

$orac_query = oci_parse( connectToDatabase1(),$query);

$result=oci_execute($orac_query);

sourav
  • 77
  • 1
  • 4

1 Answers1

0

I strongly discourage following these instructions to use MantisBT with Oracle as it relies on heavy and unsupported customization of the code.

If you're planning to use MantisBT 1.2.x series, you'll be much better off using the Oracle branch I've been maintaining over the past few years. It is not "officially" part of MantisBT (so don't expect much support) but at least you don't have to change the whole code base.

Alternatively and if you don't mind "bleeding edge", you can use a nightly build of the latest development branch, which includes improved Oracle support (essentially a port of the above-mentioned branch, with some additional fixes). Report any issues with that on the Official MantisBT bugtracker.

dregad
  • 1,150
  • 8
  • 21