On Wed, 2008-10-22 at 13:16 -0400, Seth Foss wrote: > Robert Cummings wrote: > > On Wed, 2008-10-22 at 11:59 -0400, Seth Foss wrote: > > > >> Hi everyone, > >> > >> I am trying to run multiple sites on the same server, that have mostly > >> identical code - a pre-built application. > >> > >> Anyway, I would like to save disk space by specifying independent > >> configuration files for each site, then using symbolic links to access > >> the rest of the code for the application. > >> > >> I have managed to configure apache so one such directory is accessed via > >> a symlink, which is ok. However, a file within the linked directory > >> attempts to include the configuration file (../config.php) from the > >> actual parent directory instead of the directory containing the symlink. > >> > >> Is there any way to configure apache or php to trace back the symlink > >> when using '..', or can that only go one direction? > >> > > > > Why not use CVS or SVN and just checkout the code? Sure you have it in > > multiple places that way, but it's a cinch to deploy and allows rollback > > to specific versions on any given tree. > > > > Cheers, > > Rob. > > > Thanks for the advice, Rob. I actually do have CVS and have been using > it the way you describe. However, the sheer quantity of websites is > beginning to overwhelm our disk space, especially when you consider that > everything but the configuration is identical, and we do almost no > modification to 95% of the code. > > Anyway, if it isn't possible, then that's fine. I'm just trying to use > our resources as efficiently as possible. > > Does anyone have any other ideas? What I do in almost all my projects is declare in a config someplace the absolute path to the web tree on the filesystem.... something like: $GLOBALS['interJinn']['pageRoot'] = '/path/to/website/pages/'; Then in weird cases like this I could use that to get the include path since I know where my site is. In fact, you can even auto set the root path using something like: $GLOBALS['interJinn']['pageRoot'] = dirname( __FILE__ ).'/'; Then you don't even need to actually set it when you move your site around as long as the config is in root. If the config isn't in the root directory then just chop off directories from the end until you have the root location. HTH, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php