Page 1 of 1

Upgrade: Replacing config_defaults_inc.php

Posted: 27 Jul 2006, 06:41
by palula
On an upgrading basis...

Is it safe to completely change the config_defaults_inc.php? The main thing I want to know is? Does that file remain unchanged after each upgrade. In other words, after I make the upgrade, instead of configuring config_defaults_inc.php all over again. Is it safe to just replace the file with the previous working version (in my case replacing the default 1.0.5 with my working/configured 1.0.3)?

I did this at home and everything worked fine, except for the version, still showing 1.0.3...

Afterwards, I found out that the version is just a variable that can be changed (in config_defaults_inc.php). If this is right, this procedure would highly decrease time consumption between upgrades.

Hope you guys can help...
Thanks!

Posted: 27 Jul 2006, 11:21
by Narcissus
In reality, your changes are meant to go into a file called config_inc.php (there's a sample somewhere in the main directory, I believe).

Only your changed variables go in to that file.

The idea is that on upgrade you can just copy over the top of config_defaults_inc.php to get any of the new variables, but it won't undo anything that you've already changed, because all of your changes are in a different file that is not overwritten.

Hopefully that makes sense!

Posted: 27 Jul 2006, 18:42
by palula
But then there´s this...

config_inc.php carries all the configs relative to connecting to the host, connecting to the database etc. That´s really the main config. But config_defaults_inc.php has configuration relative who is the guy that can delete bugs (in my case only the manager and up)... Again, it has configs relative to smtp servers for sending notifications... Etc...

config_inc.php doesn´t cover that section does it?

Posted: 27 Jul 2006, 18:43
by Narcissus
Yes it does.

Although by default config_inc.php just has that database stuff in it, it is used to override ANY configuration setting in config_defaults_inc.php.

Posted: 27 Jul 2006, 20:10
by palula
So how can I do that?
Just copy the variables I have changed and paste them onto config_inc.php?

Could you show an example?

Thanks! :)

Posted: 27 Jul 2006, 20:16
by Narcissus
That's exactly what you do. Copy the lines that you've edited straight in to config_inc.php, between the <?php and ?> tags.

Consider the values that are already in config_inc.php your example :)

Posted: 28 Jul 2006, 16:06
by mroeder
Palula, perhaps this explanation will help:

Whenever a Mantis page is generated, the files config_defaults_inc.php and
config_inc.php are read in that order. config_defaults_inc.php can set all the variables it wants to, but config_inc.php gets the final say.

So to set your own custom values, do that in config_inc.php—and preserve that file while updating!

Posted: 28 Jul 2006, 20:02
by palula
Thanks mroeder...

This post helped me a lot. I already upgraded to version 1.0.5 in about 5 minutes. Thank you very much! :-)