Page 1 of 2

Admin Home Page Error

Posted: Sat May 09, 2009 12:09 am
by anshin
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

Re: Admin Home Page Error

Posted: Sun May 10, 2009 9:21 pm
by jnixus
have you got xml support for php installed?

no suitable wrapper could be found

Re: Admin Home Page Error

Posted: Sat May 16, 2009 12:40 am
by anshin
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

Re: Admin Home Page Error

Posted: Sat May 16, 2009 4:43 am
by palmerozo
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 ...

Re: Admin Home Page Error

Posted: Sat May 16, 2009 4:48 am
by Daniel
your host has propbably disable file_get_contents for security reasons.

contact them ask them to enable it again.

Re: Admin Home Page Error

Posted: Sat May 16, 2009 5:22 am
by palmerozo
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 ?

:)

Re: Admin Home Page Error

Posted: Sat May 16, 2009 10:12 am
by Daniel
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.

Re: Admin Home Page Error

Posted: Sat May 16, 2009 4:38 pm
by hitu_125
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..

Re: Admin Home Page Error

Posted: Sat May 16, 2009 9:04 pm
by palmerozo
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"

Re: Admin Home Page Error

Posted: Sun May 17, 2009 7:28 am
by anshin
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. :-)

Re: Admin Home Page Error

Posted: Sun May 17, 2009 1:15 pm
by andyshine
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...

Re: Admin Home Page Error

Posted: Sun May 17, 2009 11:26 pm
by anshin
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

Re: Admin Home Page Error

Posted: Wed May 20, 2009 2:50 am
by tifonet
i also have these same errors on the home page of admin only.

Re: Admin Home Page Error

Posted: Wed May 20, 2009 4:21 am
by Daniel
tifonet wrote:i also have these same errors on the home page of admin only.
jkust turn off auto currency in the settings.

Re: Admin Home Page Error

Posted: Wed May 20, 2009 4:24 am
by Daniel
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.

Re: Admin Home Page Error

Posted: Wed May 20, 2009 4:43 pm
by tifonet
Daniel wrote:jkust turn off auto currency in the settings.
i tried this, doesn't work ...

Re: Admin Home Page Error

Posted: Mon May 25, 2009 8:11 am
by hakim
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

Re: Admin Home Page Error

Posted: Fri Jun 05, 2009 1:55 am
by Enerzy
Thanks alot Hakim....

I solve it....

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

and allow_url_fopen = On;

Re: Admin Home Page Error

Posted: Tue Jun 30, 2009 9:58 am
by kdmp
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.

Re: Admin Home Page Error

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