Index: trunk/phase3/includes/ProxyTools.php |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | escapeshellarg( $port ), |
168 | 168 | escapeshellarg( $url ) |
169 | 169 | )); |
170 | | - exec( "php $params &>/dev/null &" ); |
| 170 | + exec( "php $params &>" . wfGetNull() . " &" ); |
171 | 171 | } |
172 | 172 | # Set MemCached key |
173 | 173 | $wgMemc->set( $mcKey, 1, $wgProxyMemcExpiry ); |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2816,6 +2816,10 @@ |
2817 | 2817 | * @return string |
2818 | 2818 | */ |
2819 | 2819 | function wfGetNull() { |
| 2820 | + global $wgNullFile; |
| 2821 | + if ( $wgNullFile ) { |
| 2822 | + return $wgNullFile; |
| 2823 | + } |
2820 | 2824 | return wfIsWindows() |
2821 | 2825 | ? 'NUL' |
2822 | 2826 | : '/dev/null'; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -170,6 +170,13 @@ |
171 | 171 | $wgDirectoryMode = 0777; |
172 | 172 | |
173 | 173 | /** |
| 174 | + * Path to null output (/dev/null on *nix, NUL on Windows) |
| 175 | + * Can be left unset unless you need to override it (ie: |
| 176 | + * open_basedir won't let you hit /dev/null. See bug 11009) |
| 177 | + */ |
| 178 | +$wgNullFile = false; |
| 179 | + |
| 180 | +/** |
174 | 181 | * New file storage paths; currently used only for deleted files. |
175 | 182 | * Set it like this: |
176 | 183 | * |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -68,6 +68,8 @@ |
69 | 69 | and should still be used in code meant to be compatible with v1.13 or older. |
70 | 70 | * MediaWiki can be forced to use private IPs forwarded by a proxy server by |
71 | 71 | using $wgUsePrivateIPs. |
| 72 | +* (bug 11009) The null file (ie: /dev/null) can be configured with $wgNullFile. |
| 73 | + Useful for overriding if the normal file isn't accessible |
72 | 74 | |
73 | 75 | === Migrated extensions === |
74 | 76 | The following extensions are migrated into MediaWiki 1.14: |