diff options
author | Andrew Dolgov <[email protected]> | 2013-04-11 19:12:00 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-11 19:12:00 +0400 |
commit | 3306daecf4450555961490c11e70e7cf7fe7b86e (patch) | |
tree | 98e1162f201f0f0672e14bd12c76677e4d24337e /include | |
parent | 063ac6135304223d6667401936e3a3931522b07c (diff) |
implement upload-related support for open_basedir
Diffstat (limited to 'include')
-rw-r--r-- | include/rssfuncs.php | 2 | ||||
-rw-r--r-- | include/sanity_check.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 727e42897..7c2e1655b 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1191,7 +1191,7 @@ } function expire_cached_files($debug) { - foreach (array("simplepie", "images", "export") as $dir) { + foreach (array("simplepie", "images", "export", "upload") as $dir) { $cache_dir = CACHE_DIR . "/$dir"; if ($debug) _debug("Expiring $cache_dir"); diff --git a/include/sanity_check.php b/include/sanity_check.php index 99d3051f3..69309290e 100644 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -55,6 +55,10 @@ array_push($errors, "Image cache is not writable (chmod -R 777 ".CACHE_DIR."/images)"); } + if (!is_writable(CACHE_DIR . "/upload")) { + array_push($errors, "Upload cache is not writable (chmod -R 777 ".CACHE_DIR."/upload)"); + } + if (!is_writable(CACHE_DIR . "/export")) { array_push($errors, "Data export cache is not writable (chmod -R 777 ".CACHE_DIR."/export)"); } @@ -102,10 +106,6 @@ array_push($errors, "LOCK_DIRECTORY defined in config.php is not writable (chmod -R 777 ".LOCK_DIRECTORY.").\n"); } - if (ini_get("open_basedir")) { - array_push($errors, "PHP configuration option open_basedir is not supported. Please disable this in PHP settings file (php.ini)."); - } - if (!function_exists("curl_init") && !ini_get("allow_url_fopen")) { array_push($errors, "PHP configuration option allow_url_fopen is disabled, and CURL functions are not present. Either enable allow_url_fopen or install PHP extension for CURL."); } |