* Add override in case /dev/null isn't accessible (bug 11009)
* Use wfGetNull() in ProxyTools rather than hardcoding it
and should still be used in code meant to be compatible with v1.13 or older.
* MediaWiki can be forced to use private IPs forwarded by a proxy server by
using $wgUsePrivateIPs.
+* (bug 11009) The null file (ie: /dev/null) can be configured with $wgNullFile.
+ Useful for overriding if the normal file isn't accessible
=== Migrated extensions ===
The following extensions are migrated into MediaWiki 1.14:
*/
$wgDirectoryMode = 0777;
+/**
+ * Path to null output (/dev/null on *nix, NUL on Windows)
+ * Can be left unset unless you need to override it (ie:
+ * open_basedir won't let you hit /dev/null. See bug 11009)
+ */
+$wgNullFile = false;
+
/**
* New file storage paths; currently used only for deleted files.
* Set it like this:
* @return string
*/
function wfGetNull() {
+ global $wgNullFile;
+ if ( $wgNullFile ) {
+ return $wgNullFile;
+ }
return wfIsWindows()
? 'NUL'
: '/dev/null';
escapeshellarg( $port ),
escapeshellarg( $url )
));
- exec( "php $params &>/dev/null &" );
+ exec( "php $params &>" . wfGetNull() . " &" );
}
# Set MemCached key
$wgMemc->set( $mcKey, 1, $wgProxyMemcExpiry );