diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-05-15 22:16:20 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-05-15 22:16:20 -0400 |
commit | f0454c03e504becf67661462347922f7dbea9e55 (patch) | |
tree | b7132fc2cbf50f93b1b632c7304baca9a287eb1b | |
parent | 1105e0487fea666944a9cad887dbbff9e5c16a9f (diff) | |
download | ampache-f0454c03e504becf67661462347922f7dbea9e55.tar.gz ampache-f0454c03e504becf67661462347922f7dbea9e55.tar.bz2 ampache-f0454c03e504becf67661462347922f7dbea9e55.zip |
Set the memory_limit to at least 32M
'32' != '32M'
-rwxr-xr-x | docs/CHANGELOG.md | 1 | ||||
-rw-r--r-- | lib/init.php | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8c66b4b6..4205971a 100755 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -3,6 +3,7 @@ CHANGELOG 3.6-FUTURE ---------- +- Fixed some issues with the logic around memory_limit (reported by CableNinja) - Fixed issue that sometimes removed ratings after catalog operations (reported by stebe) - Fixed catalog song stats (reported by stebe) diff --git a/lib/init.php b/lib/init.php index eddc306f..fb1b9201 100644 --- a/lib/init.php +++ b/lib/init.php @@ -121,8 +121,10 @@ if (substr($post_size,strlen($post_size)-1,strlen($post_size)) != 'M') { // In case the local setting is 0 ini_set('session.gc_probability','5'); -if (!isset($results['memory_limit']) || $results['memory_limit'] < 32) { - $results['memory_limit'] = 32; +if (!isset($results['memory_limit']) || + (UI::unformat_bytes($results['memory_limit']) < UI::unformat_bytes('32M')) +) { + $results['memory_limit'] = '32M'; } set_memory_limit($results['memory_limit']); |