Page 1 of 2
array_combine() and Cannot modify header information warning
Posted: Sat Jun 06, 2009 9:34 pm
by Adrian
Hello, I've installed opencart yesterday and I find it very useful and easy to modify (at least the CSS for a theme).
I have enabled two languages: Bulgarian (default) and English and two currencies Euro and BGN.
I did the localisation and used a Bulgarian language mode.
Somewhere after the localisation I started receiving in the admin panel:
"Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /home/adrian/public_html/store/admin/model/localisation/currency.php on line 80
Warning: Cannot modify header information - headers already sent by (output started at /home/adrian/public_html/store/admin/model/localisation/currency.php:80) in /home/adrian/public_html/store/system/library/response.php on line 65"
I don't have a clue of PHP but as far as I understand there is a problem in the module which calculates the currencies? However the calculation seems to work fine and I do not see a problem in the user part of the site except for the error: "Error: Could not load language product/special!" when "special offers" link is clicked while in Bulgarian language.
I have searched the forum for information but didn't find anything of use to me.
I will greatly appreciate any help with regard to explaining and resolving these two problems!
Re: array_combine() and Cannot modify header information warning
Posted: Tue Jun 09, 2009 1:41 am
by Adrian
I did fix the "Error: Could not load language product/special!" error by adding the missing special.php file (and translating it). However the other error is still present and definitely appears after the locale is changed to Bulgaria.
I will be grateful if someone can give an answer to this!
Re: array_combine() and Cannot modify header information warning
Posted: Thu Jun 11, 2009 11:28 pm
by Adrian
OK, thank you very much! For being such a nice and supportive developers and community.
I guess I'll sort sort that out myself.
Re: array_combine() and Cannot modify header information warning
Posted: Fri Jun 12, 2009 1:04 am
by Daniel
I don't knwo which version you are using but sounds like its not opencart 1.x
Re: array_combine() and Cannot modify header information warning
Posted: Sat Jun 13, 2009 8:46 pm
by Adrian
Hi, it is OpenCart 1.2.8
Re: array_combine() and Cannot modify header information warning
Posted: Tue Jun 16, 2009 4:07 am
by georgekrastev
Hi Adrian,
Are you still having the problem?
Regards,
George
Re: array_combine() and Cannot modify header information warning
Posted: Tue Jun 16, 2009 2:53 pm
by Adrian
Hi, George
I still have it.
As long as settings/local is set to Bulgaria I start to receive the above mentioned warnings on top of the home page of the admin part of the site.
It is combined with distorsion of the graphic interface (the menu fields become taller) as you can see on the shot.
The cart seems to function correctly though I haven't tested it much.
I am using Firefox 3.0.11 and Ubuntu 9.04.
http://neurouniverse.net/store/Screenshot.png
http://neurouniverse.net/store/
Re: array_combine() and Cannot modify header information warning
Posted: Tue Jun 16, 2009 3:09 pm
by benp
Hi, i'm getting the same problem. All was fine for few weeks and all of a sudden these showed up on top of my admin panel.
Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /home/mydomain.com/admin/model/localisation/currency.php on line 80
Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain.com/admin/model/localisation/currency.php:80) in /home/mydomain.com/system/library/response.php on line 65
I am zero knowledge with reference to php. Please can anyone help. I really appreciate any help. And really desperate. Thanks
Re: array_combine() and Cannot modify header information warning
Posted: Tue Jun 16, 2009 11:51 pm
by comiclair
HI
I just started getting the error today and have been using 1.28 for a couple of weeks without any issues. I am still able to input product and edit on the admin side and the user side seems to be alright. So any help would be greatly appreciated. Thanks
Warning: file_get_contents(
http://currencysource.com/RSS/USD.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Access Forbidden/Abuse in /home/mydomain.com/admin/model/localisation/currency.php on line 76
Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /home/mydomain.com/admin/model/localisation/currency.php on line 80
Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain.com/admin/model/localisation/currency.php:76) in /home/mydomain.com/system/library/response.php on line 65
Re: array_combine() and Cannot modify header information warning
Posted: Wed Jun 17, 2009 12:53 am
by Daniel
disable the currency auto update. i think they stopped php from parsign the infromation.
Re: array_combine() and Cannot modify header information warning
Posted: Wed Jun 17, 2009 1:26 am
by comiclair
Hi Daniel
I try that and I am still getting the warning, is there anything else I could try . Also I wanted to know if this effects the anything important to the backend?
Thanks
Chad
Re: array_combine() and Cannot modify header information warning
Posted: Wed Jun 17, 2009 2:37 am
by benp
is there anyone who could really resolve these error warnings, seems lots are getting same issue here in v1.2.8
also i was thinking of giving donations once my shop is up and running, i knew they worked hard for this program, but now i'm having second thought..if this issue not resolved i try other cart... the only thing is i have already spent so much time uploading all my products.. >:(
in a month i'm launching my site and start my business officially.. i really need this get work well, no hassle. help please..
Re: array_combine() and Cannot modify header information warning
Posted: Wed Jun 17, 2009 4:00 am
by Adrian
The currency autoupdate is disabled from the beginning but this doesn't seem to have any effect.
Re: array_combine() and Cannot modify header information warning
Posted: Wed Jun 17, 2009 7:06 am
by fivepix
I'm also getting this error has any one found a fix? I tried everything people have suggested I'm launching the store in a few weeks and I need to know if this is a critical issue or if I should continue with the opening.
Re: array_combine() and Cannot modify header information warning
Posted: Wed Jun 17, 2009 8:40 pm
by fivepix
Hi All!
After a bit of digging around the forum I found the following to remove the error, can any one else tell me if this is a true fix? I've made the change on mine and it seems to be working properly.
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
by hakim » Mon May 25, 2009 12:11 am
here is the link
http://forum.opencart.com/viewtopic.php ... ror#p20678
Re: array_combine() and Cannot modify header information warning
Posted: Thu Jun 18, 2009 12:52 am
by Adrian
Doesn't work for me.
It might be useful to say that the warnings are present only on the home page of the administration interface.
Re: array_combine() and Cannot modify header information warning
Posted: Thu Jun 18, 2009 3:27 am
by gavin m
I started to have this issue today. Disabled the 'update currency' setting, and made the change in the home.php file and it's fixed the error for now.
Will keep an eye on it...
Re: array_combine() and Cannot modify header information warning
Posted: Thu Jun 18, 2009 12:40 pm
by diatomin
Hi Guys!
Here's what I figured out about this array_combine() issue relating to the currency.php file. it's caused by a function that's supposed to automatically do an update on your currencies from the currencysource website (XML feed). The way I see it, currencysource has made some policy changes to accessing their XML file and while it's still possible to retrieve the file, you can only do so within a certain time frame. Let's say you can only grab it every 10 minutes (I'm not sure about the specific time, but when you do a refresh of the homepage with a reasonable time gap, the error does not appear). Try accessing the xml file link directly like the following:
http://feeds.currencysource.com/AUD.xml
See the RSS display properly? Try refreshing your browser - it'll give you a 403 access forbidden error / abuse.
So for now it's not a serious problem to panic about. However, there needs to be some sort of catch for this error as during the time of development, I don't think the developers expected currencysource to tighten its noose on their xml file

.
Just my two cents and hope it helps peeps here.
Cheers,
L
Re: array_combine() and Cannot modify header information warning
Posted: Sat Jun 20, 2009 8:37 pm
by georgekrastev
Hi *,
As I already mentioned in some of my former reply I have been getting some warnings from user side, but never on admin one:
http://forum.opencart.com/viewtopic.php?t=4417
Where the problem is comming from:
Since I am using as additional language the German one there are some simboles which have been shown incorrect (like Ü,Ö,ß,Ä), therefore I convert all php files (in .\opencart\catalog\language\german\) to UFT-8 fortmat (original ones are in ASCII). This solve the problem with visualisation, but unfortunately "warning" message pops up

.
Solution:
Keep all files in ASCII format, but wherever you have a special chars replace them with a HTML numbers like:
Instead of "Züruck" just use 'Züruck'.
On this case the warning messages are gone, and the visualization is correct again.
The web side looks like:
http://www.oniart.eu
The ACSII table you can find under:
http://ascii.cl/htmlcodes.htm
P.S. From my point of view opencart is a very good platform and I would like to thanks to all contributors and developers to make it happen.
Best regards,
George
Re: array_combine() and Cannot modify header information warning
Posted: Sat Jun 20, 2009 9:51 pm
by Daniel
update to the latest version to fix the currency issue.