Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: tonzodehoo on October 13, 2018, 06:27:22 AM

Title: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 06:27:22 AM
I have returned to simple machines after a time away.
I have installed v2.01 and loaded a theme which I had used in a previous installation elsewhere.
In the top left hand corner there is a line of characters which appear before the header and in the index.php file I believe.
Can I remove these from the index.php file?
I also inserted another logo into the them but what I have noticed is that the page does not refresh after the changes. Even after I have completely removed the new logo image completely the page does not refresh. I have tried it in two other browsers and disabled the cage, emptied the cache etc but to no avail.

Even after removing the characters from the index.php file the page does not refresh.
Is this the line which generates the characters:
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");
   };

Maybe its something obvious. Any inputs would be much appreciated as I reconnect with simple machines.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Aleksi "Lex" Kilpinen on October 13, 2018, 08:35:22 AM
Any odd text at the top of an index file is one of the most common tell tale signs that your server has been compromised, in other words you may have been hacked. It can of course just be something else, but I would not rule anything out at this point.

What version are you on exactly?
Could you share the url?
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 08:44:19 AM
Hello Aleksi,
Many thanks for your response.
The url is here:
http://thegorbals.co.uk/stfrancisparentcouncil/index.php

I think I realise that the server is slow to refresh the changes to the images even after refreshing the cache so the image issue is down to this sluggish response. The line of figures is one that I thought removing the line above from the index.php file would resolve that issue.

Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Arantor on October 13, 2018, 09:05:36 AM
The line you point out from index.php is unrelated. If it was related, the first 4 characters of text would be 'GIF8'. If you have removed that line of code, please put it back otherwise you will likely make a problematic situation worse.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Aleksi "Lex" Kilpinen on October 13, 2018, 09:09:58 AM
You may want to check other index files too, root index.php, index.template.php of any and all themes, and so on. And if you find the matching code, copy the code here including a few lines before and after.

Also check the folders for any files that you do not recognize, or have been modified very recently.

When did this appear?
Was it immediately when you installed the theme, or later?
Where did you get the theme from?
Does it appear if you switch to the default (curve)?
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 09:33:10 AM
Hullo, Thanks for the input.
It is theme related. The characters are only apparent when using the one theme I want to use.
I am using a theme which works with another forum and fits in well with the scheme of the rest of the website.
Is Firox Multicolor by smfsimple. I note that its no longer available for download so I guess its not current or supported though it does still work. Not sure if there is an equivalent which fits in with what I want to achieve.

Is it likely that the characters are generated by the die command in the index.php due to the  theme being incompatible in some way? Just thinking.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Tonyvic on October 13, 2018, 09:36:19 AM
vbgamer45 gave you a download link in a previous topic by yourself.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Aleksi "Lex" Kilpinen on October 13, 2018, 09:36:23 AM
Mind attaching the themes index.template here temporarily?
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Arantor on October 13, 2018, 09:36:45 AM
No, it absolutely isn't (as already pointed out). Firstly, a die command means it stops all execution at that point so it wouldn't have any other content after it. Secondly, the first four characters out of that list of codes translates to "GIF8" - the first 4 characters you'd find in a GIF file (because it's telling SMF to emit a single blank pixel as an image - and what you have does not correspond).

If you can attach the index.template.php file of the theme here, maybe that'll help.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 09:42:20 AM
Quote from: Tonyvic on October 13, 2018, 09:36:19 AM
vbgamer45 gave you a download link in a previous topic by yourself.

I was given a link and I used it to compare it to a version I found on another drive from the older forum I'd setup many years ago just to see if there had been any changes and check it was all as it should be.
It all seemed to be fine.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 09:45:41 AM
Quote from: Arantor on October 13, 2018, 09:36:45 AM
If you can attach the index.template.php file of the theme here, maybe that'll help.

Thanks for the info.

Here is the index template from the theme.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Aleksi "Lex" Kilpinen on October 13, 2018, 09:53:37 AM
Just to make sure, is that copied from the server now - or a copy from a file you had handy before?
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 10:00:07 AM
Its a copy from the server a few moments ago.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Aleksi "Lex" Kilpinen on October 13, 2018, 10:04:03 AM
Okay, then at the same time I'd say good news and bad news. I don't immediately see anything to explain that in there, and logically that should be the place to output something like that.
So good news, the file seems to be ok - bad news, we still don't know where it comes from.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Deaks on October 13, 2018, 10:39:05 AM
does it show just on that theme or does it show on other themes?
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 13, 2018, 12:29:52 PM
Just with this them. Its the only other one installed apart from the default and Core ones
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Sir Osis of Liver on October 13, 2018, 11:57:01 PM
That index template does not cause the characters above header when run in Curve, it's apparently coming from somewhere else in the theme.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 14, 2018, 06:38:49 PM
Just noticed that the line of characters is at the start of the body div before it loads the stylesheets and not before the header as I first mentioned.
Not sure if that helps at all?
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Sir Osis of Liver on October 14, 2018, 06:42:52 PM
Can you zip the theme and attach it here, or pm ftp access (server/user/pw)?

Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 14, 2018, 06:49:57 PM
Here it is.

Thanks



Edit: Private theme removed at request of theme author
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Sir Osis of Liver on October 14, 2018, 06:52:30 PM
Is that the theme you're running or the original download?

n/m, I'm seeing it on test install.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 14, 2018, 06:59:34 PM
Thats the original download which is also being used. The only change was the addition of the logo. The characters were there before I added the logo in.
Title: Re: Line of odd characters above the header & non refreshing page content
Post by: Sir Osis of Liver on October 14, 2018, 07:31:59 PM
index.template.php



/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = true;



Change it to false.

Title: Re: Line of odd characters above the header & non refreshing page content
Post by: tonzodehoo on October 15, 2018, 04:07:00 AM
Hello Sir Osis,

Thats it. Thanks.
Not sure what exactly the optional theme strings are but the characters generated are no longer visible.

Really appreciate your time on this. Now I can get on with setting things up as they are supposed to be.

Best wishes.