summaryrefslogtreecommitdiffstats
path: root/lib/debug.lib.php
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2011-09-19 13:35:23 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2011-09-19 13:40:07 -0400
commit99fd9d7fe22a8aa81b3f54c2edbcabf95e2526d4 (patch)
tree410d08a28956ef2419c7942b82aeb1536b3ef5e7 /lib/debug.lib.php
parenta352cb965dcb2ad15a823467192113b0f3a34879 (diff)
downloadampache-99fd9d7fe22a8aa81b3f54c2edbcabf95e2526d4.tar.gz
ampache-99fd9d7fe22a8aa81b3f54c2edbcabf95e2526d4.tar.bz2
ampache-99fd9d7fe22a8aa81b3f54c2edbcabf95e2526d4.zip
Make debug and install tests friendlier
"PHP putenv support" had nothing to do with putenv. Split it into multiple tests and have the output actually correspond to what we're checking.
Diffstat (limited to 'lib/debug.lib.php')
-rw-r--r--lib/debug.lib.php34
1 files changed, 21 insertions, 13 deletions
diff --git a/lib/debug.lib.php b/lib/debug.lib.php
index 5bdd6619..bacdd19e 100644
--- a/lib/debug.lib.php
+++ b/lib/debug.lib.php
@@ -240,13 +240,21 @@ function check_php_timelimit() {
} // check_php_timelimit
/**
- * check_putenv
- * This checks to see if we can manually set the
- * memory limit, and other putenvs we need for
- * ampache to work correctly
+ * check_safe_mode
+ * Checks to make sure we aren't in safe mode
*/
-function check_putenv() {
+function check_safemode() {
+ if (ini_get('safe_mode')) {
+ return false;
+ }
+ return true;
+}
+/**
+ * check_override_memory
+ * This checks to see if we can manually override the memory limit
+ */
+function check_override_memory() {
/* Check memory */
$current_memory = ini_get('memory_limit');
$current_memory = substr($current_memory,0,strlen($current_memory)-1);
@@ -264,12 +272,14 @@ function check_putenv() {
return false;
}
- /* Check if safe mode is on */
- if (ini_get('safe_mode')) {
- return false;
- }
+ return true;
+}
- // See if we can override the set_time_limit();
+/**
+ * check_override_exec_time
+ * This checks to see if we can manually override the max execution time
+ */
+function check_override_exec_time() {
$current = ini_get('max_execution_time');
set_time_limit($current+60);
@@ -277,10 +287,8 @@ function check_putenv() {
return false;
}
-
return true;
-
-} // check_putenv
+}
/**
* check_gettext