Post by tifonet » Wed May 20, 2009 1:02 am

I get these errors only in the admin home page :
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /admin/model/localisation/currency.php on line 76

Warning: file_get_contents(http://currencysource.com/RSS/GBP.xml) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /admin/model/localisation/currency.php on line 76

Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /admin/model/localisation/currency.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /admin/model/localisation/currency.php:76) in /system/library/response.php on line 65

Newbie

Posts

Joined
Sat May 09, 2009 3:17 am

Post by readyman » Sun May 24, 2009 7:35 pm

Does everything still work correctly in your installation apart from these errors displaying?
It could just be your PHP setup showing all errors.
Solution here - http://forum.opencart.com/viewtopic.php?f=20&t=4078

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by Daniel » Sun May 24, 2009 7:43 pm

ask your host about allow.url.open

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by kdmp » Thu Jun 04, 2009 10:46 am

Was this resolved?

I am having the same issue:
Warning: file_get_contents(http://currencysource.com/RSS/CDN.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/blahblah/public_html/somedirectory/store/admin/model/localisation/currency.php on line 76

Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /home/blahblah/public_html/somedirectory/store/admin/model/localisation/currency.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /home/blahblah/public_html/somedirectory/store/admin/model/localisation/currency.php:76) in /home/blahblah/public_html/somedirectory/store/system/library/response.php on line 65
Dan, noticed you mentioned allow.url.open - you mean off for that right? I thought having that on could lead to some kinda exploit if memory serves me correctly. :(

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by kdmp » Thu Jun 04, 2009 11:41 am

Hey Dan,

currencysource.com changed the path to the rss currency data. See the example Candian link below:
That would be why I am receiving this error (404 - Not Found) - and anybody else that may not have fixed this manually after initializing Admin->Settings->Local->Auto Update Currency

To fix:

Open: admin/model/localisation/currency.php. Go to line 76 -

Code: Select all

$xml = file_get_contents('http://currencysource.com/RSS' . $this->config->get('config_currency') . '.xml');
change it too:

Code: Select all

$xml = file_get_contents('http://feeds.currencysource.com/' . $this->config->get('config_currency') . '.xml');
Now ironically - entering the correct path - I still receive the error message - but now the path is correct.

Next - time to find out where the problem is. Changed the above line to the following:

Code: Select all

$xml = file_get_contents('http://feeds.currencysource.com/CAD.xml');
That worked. My currency items were updated. So it appears to be a problem with "$this->config->get('config_currency'). Even though it does return http://feeds.currencysource.com/CAD.xml like it is supposed to. For what ever reason, while it was being used inside file_get_contents() it yielded a page not found error.

Now I am mainly dealing with CDN here, so I don't have to worry so much about the default currency setting I can keep it set manually here, but I would like to find out what is wrong here so I can fix it :)

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada
Who is online

Users browsing this forum: No registered users and 5 guests