summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-02 00:28:37 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-02 00:28:37 +0000
commite9133f9825735a072bb3ce54daac1d85edb3a806 (patch)
treef4f01cd7f846e465c1cb1a142f3a3b6ecab0326c /lib
parent00d74cac5a20c26017554b5e6eaef624b48f886e (diff)
downloadampache-e9133f9825735a072bb3ce54daac1d85edb3a806.tar.gz
ampache-e9133f9825735a072bb3ce54daac1d85edb3a806.tar.bz2
ampache-e9133f9825735a072bb3ce54daac1d85edb3a806.zip
fixed mpd logic error and post max size
Diffstat (limited to 'lib')
-rw-r--r--lib/debug.lib.php5
-rw-r--r--lib/init.php6
2 files changed, 11 insertions, 0 deletions
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;
}