Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1588,6 +1588,9 @@ |
1589 | 1589 | if ( php_uname( 's' ) == 'Linux' ) { |
1590 | 1590 | $time = ini_get( 'max_execution_time' ); |
1591 | 1591 | $mem = ini_get( 'memory_limit' ); |
| 1592 | + if( preg_match( '/^([0-9]+)[Mm]$/', trim( $mem ), $m ) ) { |
| 1593 | + $mem = intval( $m[1] * (1024*1024) ); |
| 1594 | + } |
1592 | 1595 | if ( $time > 0 && $mem > 0 ) { |
1593 | 1596 | $script = "$IP/bin/ulimit.sh"; |
1594 | 1597 | if ( is_executable( $script ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -254,7 +254,9 @@ |
255 | 255 | * Changed mail form to have a bigger message entry box (like for editing |
256 | 256 | a page |
257 | 257 | * Support <includeonly> in templates loaded through preload= parameter |
| 258 | +* Fix ulimit parameters for wfShellExec when memory_limit is specified in 'm' |
258 | 259 | |
| 260 | + |
259 | 261 | === Caveats === |
260 | 262 | |
261 | 263 | Some output, particularly involving user-supplied inline HTML, may not |