1 (edited by apmuthu 11/16/2014 03:18:04 pm)

Topic: ECB URLs moved permanently

ECB Exchange rate provider (FA default 0) needs the following patch since the URL has been moved permanently and the IP has changed.

It is safe_mode setting that needed to be checked and not the non existent save_mode as listed.

--- old/gl/includes/db/gl_db_rates.inc    Mon Sep 29 21:21:28 2014
+++ new/gl/includes/db/gl_db_rates.inc    Sun Nov 16 20:31:15 2014
@@ -112,7 +112,7 @@
     if ($provider == 'ECB')
     {
         $filename = "/stats/eurofxref/eurofxref-daily.xml";
-        $site = "www.ecb.int";
+        $site = "www.ecb.europa.eu";
     }
     elseif ($provider == 'YAHOO')
     {
@@ -141,15 +141,15 @@
            curl_setopt ($ch, CURLOPT_COOKIEJAR, "$path_to_root/tmp/cookie.txt");
            curl_setopt ($ch, CURLOPT_HEADER, 0);
            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
-           // prevent warning while save_mode/open_basedir on (redireciton doesn't occur at least on ECB page)
-           if (!ini_get('save_mode') && !ini_get('open_basedir'))
+           // prevent warning while safe_mode/open_basedir on (redireciton doesn't occur at least on ECB page)
+           if (!ini_get('safe_mode') && !ini_get('open_basedir'))
                curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt ($ch, CURLOPT_TIMEOUT, 3);
            $contents = curl_exec ($ch);
            curl_close($ch);
             // due to resolver bug in some curl versions (e.g. 7.15.5) 
             // try again for constant IP.
-           $site="195.128.2.97";
+           $site="172.230.157.137";
        } while( ($contents == '') && $retry--);
        
     } else {
Post's attachments

ECB_Fix_2014.zip 3.6 kb, 2 downloads since 2014-11-16 

You don't have the permssions to download the attachments of this post.

Re: ECB URLs moved permanently

I will have a look at this.

Joe

Re: ECB URLs moved permanently

This has now been fixed and HG repository default is update. Change goes to next minor release.

If you need a new file, you can download here and replace it in folder /gl/includes/db folder

joe