From e9133f9825735a072bb3ce54daac1d85edb3a806 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 2 Nov 2006 00:28:37 +0000 Subject: fixed mpd logic error and post max size --- lib/debug.lib.php | 5 +++++ lib/init.php | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'lib') diff --git a/lib/debug.lib.php b/lib/debug.lib.php index 5320e019..08cf7d6d 100644 --- a/lib/debug.lib.php +++ b/lib/debug.lib.php @@ -356,6 +356,11 @@ function check_putenv() { return false; } + /* Check and see if we can up the post limit */ + if (!ini_set(post_max_size,'8M')) { + return false; + } + /* Check if safe mode is on */ if (ini_get('safe_mode')) { return false; diff --git a/lib/init.php b/lib/init.php index d54706b7..3cd54d46 100644 --- a/lib/init.php +++ b/lib/init.php @@ -195,6 +195,12 @@ $old_error_handler = set_error_handler("ampache_error_handler"); vauth_init($results); /* Check their PHP Vars to make sure we're cool here */ +$post_size = @ini_get('post_max_size'); +if (substr($post_size,strlen($post_size)-1,strlen($post_size)) != 'M') { + /* Sane value time */ + ini_set('post_max_size','8M'); +} + if ($results['memory_limit'] < 16) { $results['memory_limit'] = 16; } -- cgit