diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-07-08 09:09:22 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-07-08 09:09:22 +0000 |
commit | c014a32ec312d9f701962149b62d6119a5da6b99 (patch) | |
tree | 189857deb8de2d99221aebf0b453d0a4c6c719ae /lib/debug.lib.php | |
parent | 86a9ed00b3f418fef4db30dc4f49feb5b5e7ab72 (diff) | |
download | ampache-c014a32ec312d9f701962149b62d6119a5da6b99.tar.gz ampache-c014a32ec312d9f701962149b62d6119a5da6b99.tar.bz2 ampache-c014a32ec312d9f701962149b62d6119a5da6b99.zip |
add additional information during the install process
Diffstat (limited to 'lib/debug.lib.php')
-rw-r--r-- | lib/debug.lib.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/debug.lib.php b/lib/debug.lib.php index 2aac6d9d..365b3e11 100644 --- a/lib/debug.lib.php +++ b/lib/debug.lib.php @@ -196,6 +196,41 @@ function check_config_values($conf) { } // check_config_values /** + * check_php_memory + * This checks to make sure that the php memory limit is withing the + * recommended range, this doesn't take into account the size of your + * catalog. + */ +function check_php_memory() { + + $current = ini_get('memory_limit'); + $current = substr($current_memory,0,strlen($current_memory)-1); + + if (intval($current) < 48) { + return false; + } + + return true; + +} // check_php_memory + +/** + * check_php_timelimit + * This checks to make sure that the php timelimit is set to some + * semi-sane limit, IE greater then 30 seconds + */ +function check_php_timelimit() { + + $current = ini_get('max_execution_time'); + if (intval($current) < 60) { + return false; + } + + return true; + +} // check_php_timelimit + +/** * check_putenv * This checks to see if we can manually set the * memory limit, and other putenvs we need for @@ -226,6 +261,12 @@ function check_putenv() { } // See if we can override the set_time_limit(); + $current = ini_get('max_execution_time'); + set_time_limit($current+60); + + if ($current == ini_get('max_execution_time')) { + return false; + } return true; |