Topic: Error in admin_maintenance.php

I am using the Traditional Chinese language in the forum, and I have modified a bit the common.php in the language pack in order to suit my local circumstances.

Eveything seems fine, except that when I go to Administration, and then the Maintenance section, the following words appear at the top of the page:

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/lang/Traditional_Chinese/common.php:1) in /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/lang/Traditional_Chinese/common.php:1) in /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/lang/Traditional_Chinese/common.php:1) in /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/lang/Traditional_Chinese/common.php:1) in /home/httpd/vhosts/hkukatso50.org/httpdocs/bbs/header.php on line 34


All other pages in the Administration looks fine.  Only when I go to the Maintenance section, the above sentences appear, and then the remaining maintenance page appears below the above sentences (with no obvious error).

What is the problem then?  Problem with the common.php or header.php?
Is that problem serious?  If not, I may leave it as it is, because only admin has access to that page.

Thanks in advance!

Matthew

Re: Error in admin_maintenance.php

Problem with lang/Traditional_Chinese/common.php. Make sure there is no whitespace before <?php at the beginning of the file.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Error in admin_maintenance.php

Thanks Rickard!!  I have checked but there is no whitespace before <?php at the beginning of the file.

Re: Error in admin_maintenance.php

Hello from France,

I apologize for my wrong English, I hope you understand what I wrtite.

Attention at the files edited or modified by a text editor that adds a BOM at the beginning when they are saved in Unicode format.

A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form, primarily of unmarked plaintext files.

So, the BOM is sended in the data stream each time the file is opened, i.e. before any header() code.

Best regards,

Dominique

Re: Error in admin_maintenance.php

Hello Dominique,

Thank you so much.  Yes, you are right, I am using text editor to edit the php file.  After seeing your respone, I downloaded a php editor, and I removed the strange character appearing before <?php

It is OK now.  Many thanks!

Thank also Rickard for this wonderful forum!

Matthew

Re: Error in admin_maintenance.php

MatthewCCT wrote:

It is OK now.  Many thanks !

I have had the same problem, but it was quickly solved because I use Ultraedit to create and edit my PHP and HTML files.
It is able to convert between many encoded formats and to save files with also many formats like :
- utf-8 and utf-16 with or without BOM
- utf-16 little-endian or big-endian with or without BOM
- ASCII, ANSI, MAC, EBCDIC, Unicode, OEM, Unix
- choice of lines terminator