News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Cron.php Errors

Started by skb, May 22, 2020, 12:59:00 AM

Previous topic - Next topic

skb

Using the last commit_f1adaab from GH on 3rd Feb 2020. Didn't upgrade as I'm waiting for RC3 which is very close to release.

For the past couple of days I've started getting a lot of these errors. Nothing's changed, in terms of any mods installed or any changes made.

QuoteType of error: Cron
2: Cannot modify header information - headers already sent by (output started at /home/diabesv6/public_html/Themes/default/languages/index.english.php:1)
https://www.diabetesforum.online/cron.php

The relevant code in cron.php
function obExit_cron()
291: {
292: if (FROM_CLI)
293: die(0);
294: else
295: {
==>296: header('content-type: image/gif');
297: die("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B");
298: }
299: }
300:


Backtrace Info
QuoteType of error: Cron
Error message:
2: Cannot modify header information - headers already sent by (output started at /home/diabesv6/public_html/Themes/default/languages/index.english.php:1)
File: /home/diabesv6/public_html/cron.php
Line: 296
URL of page causing the error: https://www.diabetesforum.online/index.phphttps://www.diabetesforum.online/cron.php

I did create another ftp user, which made a new folder "diabetesforum.online". Could that the culprit?

What is the ":1" in the file name index.english.php:1

Any help would be appreciated.

SMF 2.1.4 / TP 2.2.2

Arantor

Please attach that file here.

vbgamer45

:1 is the line number so yes please attach index.english.php file
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

For the record I'm assuming a BOM on the file.

skb


SMF 2.1.4 / TP 2.2.2

Arantor

Bingo, was a BOM. (See attached hex dump of file)

Also attached, a fixed version of the file.

skb

Thanks Arantor. The errors stopped as I expected they would.

For the benefit of the non-technical like me could you please elaborate;

What is a BOM ?
How did it get there ?

SMF 2.1.4 / TP 2.2.2

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

skb

Thanks vbgamer45. All my Google searches led to Bill of Materials  ;D

How did it get there, when nothing changed ?

SMF 2.1.4 / TP 2.2.2

Sir Osis of Liver

  >:( I'm not seeing it.  Did hex dump on both files (Notepad++) they're identical.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

vbgamer45

It's the first three bytes before <?php  You can see in Arantor's screenshot.

The change could happen if the file was modified you can check filetimes but looks you already fixed it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

I see them in the screenshot, but don't see them in the hex editor.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

vbgamer45

skb's first file he posted has it in there I checked as well in my editor.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

Ok, downloaded the original file again and now I see it.  Must have dl'd fixed file twice.  :P

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

skb

Quote from: vbgamer45 on May 22, 2020, 11:54:28 PM
It's the first three bytes before <?php  You can see in Arantor's screenshot.
That much I could figure out, but

Quote from: vbgamer45 on May 22, 2020, 11:54:28 PM
The change could happen if the file was modified you can check filetimes but looks you already fixed it.
But how it changed, beats me.

SMF 2.1.4 / TP 2.2.2

Arantor

How did you edit it previously?

Some editors screw it up (notably Notepad), and a better tool like Notepad++ can save "UTF-8 without BOM".

skb

I use Notepad++
but will let the sleeping dog lie for now.

Thanks all for the help. Marking it solved.

SMF 2.1.4 / TP 2.2.2

Advertisement: