Forums / General Questions / "PHP Warning" but no error in the file

"PHP Warning" but no error in the file

Views: 771

Results 1 to 6 of 6
17 Dec 2011, 8:07 PM
#1
oredayo avatar

oredayo

New Zenner

Join Date:
Oct 2010
Posts:
61
Plugin Contributions:
0

"PHP Warning" but no error in the file

Hi,
I recently installed a second language (french) for my web site.
Since this installation I can't log in to the admin.

I checked the forum and the myDEBUG file.
PHP Warning: Cannot modify header information - headers already sent by (output started at .../public_html/includes/languages/french/meta_tags.php:1)

The problem is that there is no error on the line 1 of this file.
:frusty:
Could somebody help me?
Thank you.

17 Dec 2011, 8:36 PM
#2
oredayo avatar

oredayo

New Zenner

Join Date:
Oct 2010
Posts:
61
Plugin Contributions:
0

Re: "PHP Warning" but no error in the file

My Zencart version is zen-cart-v1.3.9h.

17 Dec 2011, 9:01 PM
#3
oredayo avatar

oredayo

New Zenner

Join Date:
Oct 2010
Posts:
61
Plugin Contributions:
0

Re: "PHP Warning" but no error in the file

I found the solution by replacing a fresh metatags.php file.
Thank you.

17 Dec 2011, 9:01 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: "PHP Warning" but no error in the file

If line 1 appears to start with <?php as it should, then you've probably saved the file using a text editor which has inserted a BOM (byte order mark) in the top of the file, which is triggering an error in PHP.
Change your text editor to save as UTF8-without-BOM.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Dec 2011, 9:43 PM
#5
oredayo avatar

oredayo

New Zenner

Join Date:
Oct 2010
Posts:
61
Plugin Contributions:
0

Re: "PHP Warning" but no error in the file

Thank you for your help.
I would like to know if Zen cart has a default charset?

Since I repared the metatags file all the french fonts became like �.

18 Dec 2011, 7:05 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: "PHP Warning" but no error in the file

By default, ZC v1.3.9 and older use ISO-8859-1 in the ENGLISH language files, and make NO specifications for the database character set. Thus, the English text content will be treated as iso-8859-1 and all your database content will be based on whatever character set is set as default in your database.

For your French text, if you wish to use a different character set for your french language files, you simply set that in your french.php file.

It's primarily a result of however you've set your files.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.