Mantis Over DB2 and i-series

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
JMaX
Posts: 2
Joined: 04 Jan 2011, 08:19

Mantis Over DB2 and i-series

Post by JMaX »

Hello!!

I want to install Mantis over DB2 and i-series. The problem is the sql script don't work properly

Image

If I mark the check to show the SQL, I have a lot of errors:

SYSTEM WARNING: Invalid argument supplied for foreach()

Someone have the correct script???

Thanks, regards
atrol
Site Admin
Posts: 8553
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis Over DB2 and i-series

Post by atrol »

JMaX wrote: If I mark the check to show the SQL, I have a lot of errors:
There is a bug in MantisBT's installer when enabling the checkbox to show SQL. After running the installer with this option there is an inconsistent state where database exists but not the database schema. If you start the installation again you get various error messages.
So yo have to start from scratch, which means to drop the database manually. (or use another database name)
The other problem seems to be related to DB2 database. The installation SQL statemennts are working fine with MySQL database.
Sorry, but I am not able to give you support for DB2, maybe another user will do.
You can also write to the help mailing list and/or use IRC, see http://www.mantisbt.org/support.php
Please use Search before posting and read the Manual
JMaX
Posts: 2
Joined: 04 Jan 2011, 08:19

Re: Mantis Over DB2 and i-series

Post by JMaX »

Hello!!

Thanks for your help.

You are right because also I can see other SQL sentences wrong like
alter table rename column that don't work over DB2.

I've tried to make small fixes to sql shown but no luck. Then I will write the errors.

if anyone could let me correct the SQL script, Iwill be grateful.

Thanks. Regads
judan
Posts: 14
Joined: 14 Jan 2013, 18:26
Location: Georgetown, Guyana
Contact:

Re: Mantis Over DB2 and i-series

Post by judan »

I have also had problems with installing mantisbt over db2, but found a work around. Attached is an sql script. It is a modified script that mantis uses to install the tables. What u will need to do is run the script to install the tables manually. The schema is predefined in the script as 'MANTISDB', but you can change this to whatever you want. The next step involves crteating the 'config_inc.php' manually and pasting it in your mantis directory. This file should contain your desired credentials for mantis:

<?php
$g_hostname = 'your_db_host'; e.g B002BF95
$g_db_type = 'db2';
$g_database_name = 'same_as_ur_host_name'; e.g B002BF95
$g_db_username = 'your_as/400_username';
$g_db_password = 'your_as/400_password';
$g_db_schema = 'schema_created_by_the_sql_script'; e.g default is 'MANTISDB'
?>

The final thing you need to do is edit the file:

mantis\directory\library\adodb\adodb.inc.php, and change the sentence
define('ADODB_FETCH_ASSOC',2);
to
define('ADODB_FETCH_ASSOC',0);

Note: The last step is very important in ensuring that mantis installs successfully. Also note that at no point in time are you using http://your/mantis/directory/admin/install.php. The sql script replaces the need for this.

After completing these steps point your browser to http://your/mantis/directory/login_page.php
You should now have a running mantis application.

Note: These steps were tested for installing MantisBT-1.2.11 over db2 for IBM i V7R1.
Attachments
Mantis SQL Setup.txt
(25.03 KiB) Downloaded 777 times
wazk224

Re: Mantis Over DB2 and i-series

Post by wazk224 »

Hello Judan,

Could you please let me know where you placed the 'config_inc.php' file and what you did about the iSeries only allowing 10 characters for a table/index names e.g. mantis_config_table becomes MANTI00001 and mantis_bug_file_table becomes MANTI00002 etc...

Thanks
Warren
judan
Posts: 14
Joined: 14 Jan 2013, 18:26
Location: Georgetown, Guyana
Contact:

Re: Mantis Over DB2 and i-series

Post by judan »

The 'config_inc.php' file is placed in the mantis parent directory. I didn't have any problems with the file names so im not too sure what you should do there.
~Jailall~
judan
Posts: 14
Joined: 14 Jan 2013, 18:26
Location: Georgetown, Guyana
Contact:

Re: Mantis Over DB2 and i-series

Post by judan »

Hi wazk224. Your problem is that your DB Schema name is too long. The schema name cannot be more that 10 characters or the table names will become messed up.
~Jailall~
blackrose

Re: Mantis Over DB2 and i-series

Post by blackrose »

The schema is predefined in the script as 'MANTISDB', but you can change this to whatever you want. The next step involves crteating the 'config_inc.php' manually and pasting it in your mantis directory. This file should contain your desired credentials for mantis:
Post Reply