Advertisement:

Author Topic: directory configuration/setting  (Read 1484 times)

Offline uyuni

  • Newbie
  • *
  • Posts: 3
directory configuration/setting
« on: November 24, 2007, 05:28:48 AM »
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

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: directory configuration/setting
« Reply #1 on: November 28, 2007, 03:35:36 PM »
this is why we provide repair_settings.php (What is repair_settings.php?)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

Quote
Microsoft 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
     

Offline uyuni

  • Newbie
  • *
  • Posts: 3
Re: directory configuration/setting
« Reply #2 on: November 28, 2007, 03:46:56 PM »
repair_settings is nice but a workaround.
All directory settings in one place is much better!

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,868
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: directory configuration/setting
« Reply #3 on: November 28, 2007, 07:54:26 PM »
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
Cincy Space - now open!

Offline uyuni

  • Newbie
  • *
  • Posts: 3
Re: directory configuration/setting
« Reply #4 on: November 29, 2007, 01:46:25 AM »
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?

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,868
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: directory configuration/setting
« Reply #5 on: November 29, 2007, 04:43:30 PM »
Storing the full path and URL allows for a lot more flexibility.
Michael Eshom
Cincy Space - now open!