Upgrade: Replacing config_defaults_inc.php

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
palula
Posts: 23
Joined: 21 Jun 2006, 13:12
Location: Brasil
Contact:

Upgrade: Replacing config_defaults_inc.php

Post 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!
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post 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!
palula
Posts: 23
Joined: 21 Jun 2006, 13:12
Location: Brasil
Contact:

Post 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?
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post 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.
palula
Posts: 23
Joined: 21 Jun 2006, 13:12
Location: Brasil
Contact:

Post 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! :)
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post 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 :)
mroeder
Posts: 39
Joined: 10 Apr 2006, 20:56

Post 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!
palula
Posts: 23
Joined: 21 Jun 2006, 13:12
Location: Brasil
Contact:

Post 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! :-)
Post Reply