[TYPO3-dev] splitting localconf

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Sep 30 10:37:30 CEST 2008


Steffen Kamper wrote: on 30.09.2008 00:42:

> while mirror a site to my local computer i got an idea and want to get
> some feedback from you.
> 
> There are mainly two parts in localconf:
> * local conf (db-settings, im-settings)
> * global conf (ext-settings, TYPO3_CONF_VARS - parts of it, etc)
> 
> What's about having a localconf.local.php which is included by localconf?
> That would allow to overwrite the localconf.php by one of the online
> site without overwriting the local settings.
> 
> The cached file could merge both files, so there is no impact having 2
> files when cache is enabled.

You can already do that, in fact we have been doing that for ages now.
We even include a /var/www/shared/localconf-4.2.php that includes paths
to binaries for "all" typo3 installations that are running on a single
machine (eases upgrading or "switching" distributioNS). Just use
"include()" in your localconf.php as usual. No need to "merge" or TYPO3
even to know about it.

About the terminology, I get your point, but the distinction we usually
make is this:

1) machine specific configuration (paths, im-settings), which can be
shared along "all" TYPO3 installations on a single machine.

2) site specific, but machine dependant specific settings (db-settings,
maybe development settings, i.e. devMask, displayErrors, etc).

3) site specific configuration (which influence the workings of your
specific site, no matter on which host it is running.

And we set it up on those files:

/var/www/shared/localconf.php = 1)
typo3conf/localconf.local.php = 2)
typo3conf/localconf.php = 3), which includes 1) and 2)

We maintain 3) in CVS, to keep it in sync between different environments
(this file will also be updated by the install tool and ext manager. We
manually move stuff to localconf.local.php when required.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list