https://bugzilla.wikimedia.org/show_bug.cgi?id=55499

       Web browser: ---
            Bug ID: 55499
           Summary: Support some form of "AutoSettings.php" like our
                    "mw-config/overrides.php" to hook in after
                    DefaultSettings but before LocalSettings.
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Reading over Google App Engine's PHP environment, how things like the
Memcache(d) libraries are setup so configuration is automatically injected
under-the-hood, and looking at our mw-config/overrides.php for distributors
hosts. I thought it might be useful to have some sort of AutoSettings for hosts
that give explicit support for MediaWiki.

AutoSettings.php would be loaded after DefaultSettings.php but before
LocalSettings.php. The file itself – like mw-config/overrides.php – would be a
mere stub and explicitly declared as something it's ok for 3rd parties to
modify.

Hosts could include documentation like 'Replace .../AutoSettings.php with the
contents <?php require_once( "/node/path/to/some/common/AutoSettings.php" );' –
and perhaps do that for mw-config/overrides.php too – which would contain some
extra code added by the host.

The file would allow the defaults in DefaultSettings.php to be overridden with
defaults that work better in the hosting environment.
For some examples of what a hosting environment could do inside of an
AutoSettings.php:
- Auto configure caching to use a series of Memcached servers they offer.
- Change the defaults for $wgUseImageMagick $wgImageMagickConvertCommand
$wgImageMagickIdentifyCommand to automatically point to the system installed
ImageMagick instead of using gd by default.
- Change the defaults for $wgJpegTran, $wgExiv2Command, $wgSVGConverters, the
tidy executable, $wgDiff3, $wgDiff, $wgGitBin, and $wgPhpCli to use the correct
paths.
- Set $wgDirectoryMode to a default value that's more secure in the hosting
environment.
- Auto-configure $wgSMTP to send emails in a way that works efficiently for the
hosting environment.
- Auto-configure database settings for things like database host/port/type so
only minimal config is required. Or auto-config DBservers or the load-balancer
if they offer a standard cluster of replicated SQL servers.
- Auto-configure squid if they offer it on behalf of the users.

I suppose rather than simple AutoSettings.php another possibility might be for 
a host to use auto_prepend_file, a custom php extension, etc... and for us to
provide an API the host can have it's PHP environment automatically hook into.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to