Steps to connect mantis BT with Oracle database are as follows :
Xampp settings:
Install Xampp 1.7.3 or above on your windows OS.
Download InstantClient and extract folder to C:\instantclient folder
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
Search for string "oci8" in xampp\php\php.ini and uncomment them.
Restart you laptop/pc to accept new modification on xampp.
Mantis code settings:
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';
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;
}
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);