Post by anshin » Sat May 09, 2009 12:09 am

Hey folks ... I was just wondering if anyone has seen this error before.

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /nfs/c03/h04/mnt/49211/domains/ecoist.ca/html/opencart/admin/model/localisation/currency.php on line 76

Warning: file_get_contents(http://currencysource.com/RSS/CAD.xml) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /nfs/c03/h04/mnt/49211/domains/ecoist.ca/html/opencart/admin/model/localisation/currency.php on line 76

Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /nfs/c03/h04/mnt/49211/domains/ecoist.ca/html/opencart/admin/model/localisation/currency.php on line 80

Warning: Cannot modify header information - headers already sent by (output started at /nfs/c03/h04/mnt/49211/domains/ecoist.ca/html/opencart/admin/model/localisation/currency.php:76) in /nfs/c03/h04/mnt/49211/domains/ecoist.ca/html/opencart/system/library/response.php on line 65

I only get it when I goto the main home page of the admin section. I can move to another link and continue and work on, but it does affect the currency function. I have reinstalled, all went great ... I checked file permissions and all was fine, so I am a bit stumped. Any ideas?

Cheers

Newbie

Posts

Joined
Sat May 09, 2009 12:06 am

Post by jnixus » Sun May 10, 2009 9:21 pm

have you got xml support for php installed?

no suitable wrapper could be found

User avatar
New member

Posts

Joined
Fri Apr 17, 2009 3:26 am
Location - London

Post by anshin » Sat May 16, 2009 12:40 am

I sure do ... here is the phpinfo()

DOM

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.16
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support


libXML

libXML support active
libXML Version 2.6.16
libXML streams enabled


SimpleXML
Simplexml support enabled
Revision $Revision: 1.151.2.22.2.39 $
Schema support enabled


xml

XML Support active
XML Namespace Support active
libxml2 Version 2.6.16

Any other ideas?

Many thanks for your help.
cheers

Newbie

Posts

Joined
Sat May 09, 2009 12:06 am

Post by palmerozo » Sat May 16, 2009 4:43 am

Hi

I have same error ..


Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/27/d165157651/htdocs/palcomp/sklep/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 /homepages/27/d165157651/htdocs/palcomp/sklep/admin/model/localisation/currency.php on line 76

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

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


it shows only under admin tab
anyone can help ??

xml support is installed ...
Last edited by palmerozo on Sat May 16, 2009 5:00 am, edited 1 time in total.

Newbie

Posts

Joined
Sat May 16, 2009 4:40 am

Post by Daniel » Sat May 16, 2009 4:48 am

your host has propbably disable file_get_contents for security reasons.

contact them ask them to enable it again.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by palmerozo » Sat May 16, 2009 5:22 am

thank you for quick respond

I've just send email to my host ...
I hope It will fix the problem ...if not ..I'll change a hosting service

Can you tell me if this error effect how the whole store will work, or only the currency update ?

:)

Newbie

Posts

Joined
Sat May 16, 2009 4:40 am

Post by Daniel » Sat May 16, 2009 10:12 am

I think the only problem is the currency.

in the next version i might change the code the code that will aviod this sort of problemwith the currency.

yuo could turn off the auto currency for now.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by hitu_125 » Sat May 16, 2009 4:38 pm

Daniel wrote:I think the only problem is the currency.

in the next version i might change the code the code that will aviod this sort of problemwith the currency.

yuo could turn off the auto currency for now.
When are u going to release the next version, and until when it will get stable..

Newbie

Posts

Joined
Thu Apr 30, 2009 11:59 am

Post by palmerozo » Sat May 16, 2009 9:04 pm

I've turned off the auto currency, but still have error, but i think I can ignore it ( I hope) ... :-\

Still didn't get info from my host about "file_get_contents"

Newbie

Posts

Joined
Sat May 16, 2009 4:40 am

Post by anshin » Sun May 17, 2009 7:28 am

Well, I spoke with my host provider and they said it had to do with "allow_url_fopen" and that they have is disabled by default for security issues.

They have give these directions to provide a "This workaround method should only be used as a temporary solution".

Edit your php.ini with this

allow_url_fopen = On

If you get a memory error message, then add this snippet of code

memory_limit = 100M
cgi.fix_pathinfo=1


For the developer: my hosting provider was suggesting these alternatives. Maybe it might help.

We would highly suggest further researching and examining aspects of your site's code that depend on this functionality. There are many safer methods to accomplish the same desired results without this possible security issue.

* Use a relative path to the file stored locally
* Using the PHP environment variable $_SERVER['DOCUMENT_ROOT'], which returns the absolute path to the web root directory.
* cURL is another method that could be used. (This method is beyond the scope of this article.)

I hope this helps everyone out ... let me know if any changes to the software happen.

Thanks again and best of luck all. :-)

Newbie

Posts

Joined
Sat May 09, 2009 12:06 am

Post by andyshine » Sun May 17, 2009 1:15 pm

Warning: file_get_contents(http://currencysource.com/RSS/GBP.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in D:\wamp\www\opencart\admin\model\localisation\currency.php on line 76

Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in D:\wamp\www\opencart\admin\model\localisation\currency.php on line 80
How to solve this problem...

Newbie

Posts

Joined
Sun May 17, 2009 12:51 pm

Post by anshin » Sun May 17, 2009 11:26 pm

Hey andyshine ... there is a work around for this. If you have access to your php.ini file on your server, add this at the bottom.

allow_url_fopen = On


Save ... refresh and you should be good to go. If it doesn't take effect right away, just give it a few minutes.

Hope this helps.

Cheers

Newbie

Posts

Joined
Sat May 09, 2009 12:06 am

Post by tifonet » Wed May 20, 2009 2:50 am

i also have these same errors on the home page of admin only.

Newbie

Posts

Joined
Sat May 09, 2009 3:17 am

Post by Daniel » Wed May 20, 2009 4:21 am

tifonet wrote:i also have these same errors on the home page of admin only.
jkust turn off auto currency in the settings.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Wed May 20, 2009 4:24 am

palmerozo wrote:I've turned off the auto currency, but still have error, but i think I can ignore it ( I hope) ... :-\

Still didn't get info from my host about "file_get_contents"
i don't think so!

i just tested this and it does turn off!

turn it off under settings.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by tifonet » Wed May 20, 2009 4:43 pm

Daniel wrote:jkust turn off auto currency in the settings.
i tried this, doesn't work ...

Newbie

Posts

Joined
Sat May 09, 2009 3:17 am

Post by hakim » Mon May 25, 2009 8:11 am

if you still get same error go to admin/controller/common/ and open home.php
and then change (line 102)

//$this->model_localisation_currency->updateCurrencies();

after you never ever see same error

Newbie

Posts

Joined
Mon May 25, 2009 1:22 am

Post by Enerzy » Fri Jun 05, 2009 1:55 am

Thanks alot Hakim....

I solve it....

With //$this->model_localisation_currency->updateCurrencies();

and allow_url_fopen = On;

Newbie

Posts

Joined
Fri Jun 05, 2009 1:53 am

Post by kdmp » Tue Jun 30, 2009 9:58 am

This is more of a message for Dan, but I figure I will post an addition.

Several people reported that the error message remained after disabling the auto update currency. This will happen because it is cached. It will go away after your session has timed out or if you clear out your cache directory.

In addition to the changes Dan has said he is going to make. I think Dan could still use this same site to update the currency, however, I do suggest that cURL is used instead of fopen....which many of us host providers disable to prevent some outsiders from getting in to our servers.

My two cents - maybe worth a penny...maybe nothing...but hey.

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 studioa1 » Thu Jul 02, 2009 9:03 pm

This is a fresh install of opencart and I got the same admin page error that I fixed with the supplied suggestions. Along with this error, the default page doesn't show any images. Check it out http://www.photoxite.com

Also in the administration panels, much of the very nice formatting is all gone - no nice tabs, the shading along the sides is gone, the current page has the same color as the header background making it difficult to see what page you're on.

Could this be part of the same problem? Any help ideas appreciated.

Newbie

Posts

Joined
Thu Jul 02, 2009 8:58 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 21 guests