From 893b41431c46785856b84ca91810f905c21b6831 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 21 Apr 2009 16:02:45 +0000 Subject: [PATCH] Remove last of ini_set() for allow_url_fopen. This hasn't worked since PHP 4.3.4, when it became a PHP_INI_SYSTEM setting. --- includes/ExternalStoreHttp.php | 2 -- includes/WebStart.php | 1 - includes/templates/PHP4.php | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/ExternalStoreHttp.php b/includes/ExternalStoreHttp.php index 6eb33b3939..e81395860e 100644 --- a/includes/ExternalStoreHttp.php +++ b/includes/ExternalStoreHttp.php @@ -7,9 +7,7 @@ class ExternalStoreHttp { /* Fetch data from given URL */ function fetchFromURL($url) { - ini_set( "allow_url_fopen", true ); $ret = file_get_contents( $url ); - ini_set( "allow_url_fopen", false ); return $ret; } diff --git a/includes/WebStart.php b/includes/WebStart.php index edc58cb3a2..ffef7be5b1 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -46,7 +46,6 @@ if ( function_exists ( 'getrusage' ) ) { $wgRUstart = array(); } unset( $IP ); -@ini_set( 'allow_url_fopen', 0 ); # For security # Valid web server entry point, enable includes. # Please don't move this line to includes/Defines.php. This line essentially diff --git a/includes/templates/PHP4.php b/includes/templates/PHP4.php index 058351a006..fb794a3745 100644 --- a/includes/templates/PHP4.php +++ b/includes/templates/PHP4.php @@ -70,8 +70,7 @@ if ( $baseUrl ) { if( function_exists( 'file_get_contents' ) ) { $errorLevel = error_reporting(); error_reporting( $errorLevel & !E_WARNING ); - - ini_set( 'allow_url_fopen', '1' ); + $s = file_get_contents( $testUrl ); error_reporting( $errorLevel ); -- 2.20.1