• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Move config.php out of library directory

R

ragtek

Guest
#1
I've deleted the Zend directory from the xenforo directory because i don't want to have 10 Zend Directories on my filesystem, because it's unnecessery.

So i created a symlink from xenforo/library/Zend to /sources/XFZF

It's working nice:)
I think i could also make this with the other directories, but it would be much more compfortable to need only 1 link for this (to the library directory)
ATM this is not possible, because the config.php is unique for every installation.

This would be a big improvement
ATM i'm having 3 xenforo installations (2 testboards) and i'm saving 60MB only because of the Zend Directory.
It would be much more, if we could link the whole library directory;)

(I hope you know what i mean)
 

Kier

XenForo Developer
Staff member
#2
Strictly speaking you could already do this with relatively simple edits, as the first argument to XenForo_Application::initialize() is the config directory. You'd only need to edit a few files from the root directory to point them to the alternative config directory.

Move config.php to the root folder, and then edit index.php, admin.php, css.php, cron.php etc:
PHP:
XenForo_Application::initialize($fileDir . '/library', $fileDir);
Becomes
PHP:
XenForo_Application::initialize($fileDir, $fileDir);
 

KenSmith

Active member
#3
You could also use .htaccess to redirect requests for config.php to the various versions.

Edited to correct... Hmm, that's not going to work for php includes, now is it.