I know this question has been asked a few times, but from all the trawling I've done, I can't find any sort of definitive answer and I am hoping that a good general FAQ about this can maybe be created from this thread....
I'll describe a scenario: We want to offer several, completely separate clients a Mambo server to manage their website. All the websites will be served from a single machine for now (and there was always be several Mambo installs on a given server even if we expand to having multiple servers.
Now, I am pretty anal about security updates etc, and don't particularly like the idea of cleaning up after a hack attack, so I always want to ensure I have the most up to date Mambo installed.
We currently use Plesk to manage the server, but I've almost given up on the Add-on Application thing Plesk offers due to the lag and also the awkwardness of the upgrade process. OK, you can install new, packaged versions of Mambo via Plesk and AtomicRocketTurtle RPMS as they are released but as far as I know, this doesn't update any installed instance of Mambo on a given website (which is fundamentally what I'm trying to do).
Now here are some solutions I've come up with and would like to ask the community what they think, what other people currently do (I'm sure I'm not alone in this setup!) etc.
Solution 1 - Leg Work
Everyone gets a separate Mambo install. Patches/DB Schema changes are applied manually when updates come out, to each separate instance of Mambo. Probably the simplest solution
Solution 2 - SymLinks
I have a central Mambo "source" and when I want an instance of Mambo, I create a bunch of symlinks (ensuring the FollowSymLink apache directive is set
) except for the configuration and template files, which are manually copied in in the first instance to allow for independant modification. I don't envisage symlinking directorys, just files (perhaps using the X11 utility lndir - why isn't this one of the core utils as it's very useful
Under this scheme I could just update my central source and apply the db patches to each DB and I'd be pretty much good to go. Much less legwork.
Solution 3 - Hacktastic
This is personally what I think to be the most elegant but typically a royal pain in the you know what! One of the problems of attempting to share Mambo source is the various configuration files, media paths etc. It would be nice to modify Mambo, so that everything
is stored in the database. Images, configs, everything. Obviously the database connection configs can't be in there, but practically everything else could. This would mean a much larger database (especially for backups etc. although at least a user would have a full backup in a single file and the media stuff could be excluded if requested) but all the content could be server via psuedo files (e.g. with Path Info or Mod Rewrite) and supplied with the correct cache headers etc, to the user sees no real performance hit.
I'm guessing this would require creating a wrapper around any filesystem calls for storing files or accessing them directly and mapping this to the database instead (naturally it could also be left as a filesystem storage wrapper as I know a lot
of people wont like this
Obviously this would also impact a fair few components, but Mambo specific ones could be modified to use the wrapper and ones that are just embedding in Mambo (and can be used separately, e.g. PHP Gallery) well, perhaps these ones would be ruled out for this method, I don't know. I guess if their developers don't mind, a similar wrapper could be implemented in that system and a simple mod for Mambo applied when embedding?
Under this system, Mambo could almost be installed once and accessed via an Apache Alias directive from multiple sites. THere is always the problem of which components and modules are available (common to all intances), but for some setups this wouldn't be a problem.
OK, I'm no expert with Mambo, and I've had only the slightest glances over the source code (I'm a pretty competent PHP/MySQL person), so I don't really know how each of the above scenarios would work, so am asking for anyone elses input on this one.
As well as including a few suggestions, I'm going to have to implement a few Mambo sites pretty soon, so if anyone has any bright ideas that wont take long to hash together to get this working, I'd be very interested.
Thanks for taking the time to read this rather long post. I look forward to comments.
All the best