]> git.wh0rd.org - tt-rss.git/commitdiff
remove sanity check on open_basedir, block using CURL instead while running under it
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 5 Jul 2011 08:05:51 +0000 (12:05 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 5 Jul 2011 08:05:51 +0000 (12:05 +0400)
functions.php
modules/pref-instances.php
sanity_check.php

index 9ef45cd3f2a4b91cf4ab4698e275cc030fe183eb..4ce67003387b16ebf5ba75047cd4920a7e00baff 100644 (file)
                $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);
 
                                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";
index e365457a02f3101b2f5938031cb947efa4dbfe5a..30feb2a4f6ef2d5666660f03ffb8e4220cb5842d 100644 (file)
                        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>";
index 3007d2bb74e61fb67cfa057784aae92f9332e9b1..3f764171fc82cff0f99e683811aaba556966ef8d 100644 (file)
                $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.";