Advertisement:

Author Topic: Cron.php Errors  (Read 466 times)

Offline skb

  • Full Member
  • ***
  • Posts: 403
    • Metabolically Challenged
Cron.php Errors
« on: May 22, 2020, 12:59:00 AM »
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.

Quote
Type 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
Code: [Select]
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
Quote
Type 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.
Learning, every day.
Forum - Diabetes Forum
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,350
Re: Cron.php Errors
« Reply #1 on: May 22, 2020, 03:03:38 AM »
Please attach that file here.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,538
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Cron.php Errors
« Reply #2 on: May 22, 2020, 07:59:53 AM »
: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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,350
Re: Cron.php Errors
« Reply #3 on: May 22, 2020, 08:12:24 AM »
For the record I’m assuming a BOM on the file.

Offline skb

  • Full Member
  • ***
  • Posts: 403
    • Metabolically Challenged
Re: Cron.php Errors
« Reply #4 on: May 22, 2020, 11:03:01 AM »
File attached.
Learning, every day.
Forum - Diabetes Forum
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,350
Re: Cron.php Errors
« Reply #5 on: May 22, 2020, 11:41:47 AM »
Bingo, was a BOM. (See attached hex dump of file)

Also attached, a fixed version of the file.

Offline skb

  • Full Member
  • ***
  • Posts: 403
    • Metabolically Challenged
Re: Cron.php Errors
« Reply #6 on: May 22, 2020, 11:35:24 PM »
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 ?
Learning, every day.
Forum - Diabetes Forum
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,538
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Cron.php Errors
« Reply #7 on: May 22, 2020, 11:39:46 PM »
File was encoded as UTF8 instead of Ansi https://en.wikipedia.org/wiki/Byte_order_mark
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

Offline skb

  • Full Member
  • ***
  • Posts: 403
    • Metabolically Challenged
Re: Cron.php Errors
« Reply #8 on: May 22, 2020, 11:44:07 PM »
Thanks vbgamer45. All my Google searches led to Bill of Materials  ;D

How did it get there, when nothing changed ?
Learning, every day.
Forum - Diabetes Forum
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,141
  • Hoarding Budweiser in NY
Re: Cron.php Errors
« Reply #9 on: May 22, 2020, 11:50:55 PM »
  >:( I'm not seeing it.  Did hex dump on both files (Notepad++) they're identical.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,538
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Cron.php Errors
« Reply #10 on: May 22, 2020, 11:54:28 PM »
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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,141
  • Hoarding Budweiser in NY
Re: Cron.php Errors
« Reply #11 on: May 22, 2020, 11:55:28 PM »
I see them in the screenshot, but don't see them in the hex editor.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,538
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Cron.php Errors
« Reply #12 on: May 23, 2020, 12:00:48 AM »
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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,141
  • Hoarding Budweiser in NY
Re: Cron.php Errors
« Reply #13 on: May 23, 2020, 12:05:29 AM »
Ok, downloaded the original file again and now I see it.  Must have dl'd fixed file twice.  :P


Offline skb

  • Full Member
  • ***
  • Posts: 403
    • Metabolically Challenged
Re: Cron.php Errors
« Reply #14 on: May 23, 2020, 07:28:50 AM »
It's the first three bytes before <?php  You can see in Arantor's screenshot.
That much I could figure out, but

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.
Learning, every day.
Forum - Diabetes Forum
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,350
Re: Cron.php Errors
« Reply #15 on: May 23, 2020, 07:37:09 AM »
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”.

Offline skb

  • Full Member
  • ***
  • Posts: 403
    • Metabolically Challenged
Re: Cron.php Errors
« Reply #16 on: May 24, 2020, 03:47:03 AM »
I use Notepad++
but will let the sleeping dog lie for now.

Thanks all for the help. Marking it solved.
Learning, every day.
Forum - Diabetes Forum
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2