Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: Dave J - maaliskuu 31, 2020, 11:15:38 AP

Otsikko: Started getting error from Error.php
Kirjoitti: Dave J - maaliskuu 31, 2020, 11:15:38 AP
Hi all,

I'm running SMF 2.0.17 - PHP 7.0

See errors below

Cannot modify header information - headers already sent in /home2/d/public_html/Sources/Errors.php on line 355
Cannot modify header information - headers already sent in /home2/d/public_html/Sources/Errors.php on line 356
Cannot modify header information - headers already sent in /home2/d/public_html/Sources/Errors.php on line 357
Cannot modify header information - headers already sent in /home2/d/public_html/Sources/Errors.php on line 360
Cannot modify header information - headers already sent in /home2/d/public_html/Sources/Errors.php on line 361
Cannot modify header information - headers already sent in /home2/d/public_html/Sources/Errors.php on line 362


These are the lines in the file


// Don't cache this page!
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache');

// Send the right error codes.
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');


Not sure why this is happening now. I haven't installed any recent Mods and the last change to the Error.php file was in January when it was updated to 2.0.16

Anyone got any ideas please?
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Shambles - maaliskuu 31, 2020, 11:39:34 AP
Are there any other errors shown ahead of those, like database connection errors?
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Dave J - maaliskuu 31, 2020, 05:07:32 IP
Lainaus käyttäjältä: Shambles - maaliskuu 31, 2020, 11:39:34 AP
Are there any other errors shown ahead of those, like database connection errors?

Yes I am getting regular database errors. I have to admit I didn't think the two were connected that's why I never mentioned it before Ithought it was a host issue.
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Sir Osis of Liver - maaliskuu 31, 2020, 05:21:10 IP
Is forum connecting to database?
Otsikko: Re: Started getting error from Error.php
Kirjoitti: shawnb61 - maaliskuu 31, 2020, 09:15:55 IP
Please share the other errors.

Pretty sure this is a secondary issue - an error reporting the error...
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Dave J - huhtikuu 01, 2020, 01:21:42 AP
Lainaus käyttäjältä: Sir Osis of Liver - maaliskuu 31, 2020, 05:21:10 IP
Is forum connecting to database?

Yes it is. The database error is random and doesn't seem to form any pattern. When I go to the site it's there. There is no mention in either the host log or the admin log of the database error.



Otsikko: Re: Started getting error from Error.php
Kirjoitti: Dave J - huhtikuu 01, 2020, 01:29:32 AP
Lainaus käyttäjältä: shawnb61 - maaliskuu 31, 2020, 09:15:55 IP
Please share the other errors.

Pretty sure this is a secondary issue - an error reporting the error...

The only other error that shows on the admin log is the ban for an IP...which at present is relentless...see below

Otsikko: Re: Started getting error from Error.php
Kirjoitti: Sir Osis of Liver - huhtikuu 01, 2020, 11:44:29 AP
Link to your forum?  Where is the first screenshot from?  How did my username get there?
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Dave J - huhtikuu 01, 2020, 12:07:31 IP
Lainaus käyttäjältä: Sir Osis of Liver - huhtikuu 01, 2020, 11:44:29 AP
Link to your forum?  Where is the first screenshot from?  How did my username get there?

Forum link www.davejohnson.co.uk, that could be seen in one of the screenshots.

The first image was made up of my admin error log and the lines from the Error.php file.

Your name appears as that is a screenshot of my mail inbox.

There is a new error now that relates to headers, see screenshot below.
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Sir Osis of Liver - huhtikuu 01, 2020, 12:18:13 IP
Those database errors look like transient server errors.  If the site loads normally most of the time, users may be getting occasional errors on page loads, each one generates an email.  Not unusual on shared server, but should be few and far between.  If you're seeing a lot of them, contact host support, the problem's on their end.
Otsikko: Re: Started getting error from Error.php
Kirjoitti: Dave J - huhtikuu 02, 2020, 01:49:37 AP
Thanks for the replys guys.

There have been no databae errors for the last 12 hours and no more admin errors since the last post. The host error log is not showing any new errors either since the last post.

So whatever the problems were they've calmed down now.