News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

directory configuration/setting

Started by uyuni, November 24, 2007, 05:28:48 AM

Previous topic - Next topic

uyuni

Some directory settings are in Settings.php and others are in the database (eg. smileys_dir). The setting of the rootdirectory should be only in one place!

Now it is quite difficult to move SMF to another directory.

Solution:
Setting of rootdir and URL only in Settings.php and other directories relative of these settings.

It is better to have directory settings in a file than in the database. Then settings for 2 servers (test and productive) can be easily separated.


Emilio

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

uyuni

repair_settings is nice but a workaround.
All directory settings in one place is much better!

Oldiesmann

It's not a "workaround" of any kind. It's a tool to make changing paths and URLs much easier.

There are a couple of reasons we don't store every single path and URL in Settings.php:

1. The larger the file is, the longer it will take to load it.
2. It's not very efficient. If we stored the path and URL for every theme and smiley set in Settings.php, then this information would get loaded on every page view - even for themes and smiley sets you're not using...
Michael Eshom
Christian Metal Fans

uyuni

You don't have to store every path in settings.php.
You just have to store the rootdirectory in settings.php.
All other directories should be relative. I still think they would be better in one place but if they are relative in the database it's also OK.
I don't think it's necessary to specify all directories (eg smileys_dir). Shouldn't that be always in the same place relative from rootdir?

Oldiesmann

Storing the full path and URL allows for a lot more flexibility.
Michael Eshom
Christian Metal Fans

Advertisement: