summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-07-05 12:05:51 +0400
committerAndrew Dolgov <[email protected]>2011-07-05 12:05:51 +0400
commit3610b48ba39d7e84d4f9d098a80e7f5459112310 (patch)
tree8f3924b2a76bb1539bb0113fa90ab8c179046e38
parent19929bbeeca6598827855cffdf21a810da4b7c87 (diff)
remove sanity check on open_basedir, block using CURL instead while running under it
-rw-r--r--functions.php5
-rw-r--r--modules/pref-instances.php2
-rw-r--r--sanity_check.php4
3 files changed, 6 insertions, 5 deletions
diff --git a/functions.php b/functions.php
index 9ef45cd3f..4ce670033 100644
--- a/functions.php
+++ b/functions.php
@@ -362,7 +362,7 @@
$login = urlencode($login);
$pass = urlencode($pass);
- if (function_exists('curl_init')) {
+ if (function_exists('curl_init') && !ini_get("open_basedir")) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
@@ -816,7 +816,8 @@
if ($debug_enabled) _debug("update_rss_feed: feed hub url: $feed_hub_url");
- if ($feed_hub_url && function_exists('curl_init')) {
+ if ($feed_hub_url && function_exists('curl_init') &&
+ !ini_get("open_basedir")) {
$callback_url = get_self_url_prefix() .
"/backend.php?op=pubsub&id=$feed";
diff --git a/modules/pref-instances.php b/modules/pref-instances.php
index e365457a0..30feb2a4f 100644
--- a/modules/pref-instances.php
+++ b/modules/pref-instances.php
@@ -113,7 +113,7 @@
return;
}
- if (!function_exists('curl_init')) {
+ if (!function_exists('curl_init') && !ini_get("open_basedir")) {
print "<div style='padding : 1em'>";
print_error("This functionality requires CURL functions. Please enable CURL in your PHP configuration and reload this page.");
print "</div>";
diff --git a/sanity_check.php b/sanity_check.php
index 3007d2bb7..3f764171f 100644
--- a/sanity_check.php
+++ b/sanity_check.php
@@ -115,9 +115,9 @@
$err_msg = "config: your ICONS_DIR (" . ICONS_DIR . ") is not writable.\n";
}
- if (ini_get("open_basedir")) {
+/* if (ini_get("open_basedir")) {
$err_msg = "php.ini: open_basedir is not supported.";
- }
+} */
if (!function_exists("curl_init") && !ini_get("allow_url_fopen")) {
$err_msg = "php.ini: either allow_url_fopen or CURL needs to be enabled.";