News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

4digit hex printed (intermittently) above head (fresh install)

Started by I Agree, January 27, 2011, 02:00:39 PM

Previous topic - Next topic

I Agree

I just downloaded/installed 2.0. I don't remember this always happening the last couple days, though I may not have noticed.

Anyway, with all themes there is a four digit hexadecimal number being printed in the top left corner, presumably because it's in the document before the head.

It changes each time the page loads. Doesn't show up in Firefox presumably because it's filtered out. Shows up with Google Chrome. Source looks like:

22d5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

Doesn't happen with any other non smf2.0 install pages :o


UPDATE: I thought maybe it was only affecting guest pages for a little while. But instead today it comes and goes. It may be more to do with something the host provider or one of my server neighbors is doing or dealing with. Will keep everyone up to date as I find out more maybe.

PS: Still seems like logged in pages may be immune.

Illori

have you installed any mods recently? sounds like a file got edited incorrectly.

kat

A link, so that we can see this, might be darned useful. ;)

I Agree

Quote from: K@ on January 27, 2011, 04:11:33 PM
A link, so that we can see this, might be darned useful. ;)

There's really nothing to see besides the source snippet in the first post (it's all server side)

I copied the Core theme folder / changed the name. And edited the new theme slightly using the theme editor. But After seeing the bug. I deleted the copied folder and went back to the other themes just to be sure nothing happened. No files were changed. Settings may've affected the database.

Could have something to do with the environment. I'm not 100% positive its always been there, but I think it probably has.

Quote from: Illori on January 27, 2011, 02:02:15 PM
have you installed any mods recently? sounds like a file got edited incorrectly.

Fresh install. Nothing added. Downloaded a few days ago.

Corrupted files maybe?

Illori

can you try a new install in a different folder to confirm if it has anything to do with your setup or modified file?

I Agree

Quote from: Illori on January 27, 2011, 06:07:43 PM
can you try a new install in a different folder to confirm if it has anything to do with your setup or modified file?

Well I'll delete/decompress the folder again assuming no vital files will be harmed, but I don't want to redo the database at this point.

Illori

as long as you save Settings.php you will not loose you connection to the database. as long as you do not drop the database [the command drop] you will not loose the information in the database.

I Agree

#7
Deleted everything and unpacked the .zip again and the digits persist. I can help debug things if you guys like.

I will probably try to repair the database later. Though if it fixes things you might lose a chance to uncover an odd bug (or something bigger)

I've done a lot with PHP but never massive stuff like SMF. Can PHP log the file writes or something? Having a line number for example might help narrow things down.

PS: I should maybe check the checksums on my archive at this point. What's a quick way to do that over SSH on any given server (not something I've ever had / bothered to do before)

Illori


I Agree

No errors.

md5sum smf_2-0-rc4_install.zip
292573ef26f7285760eaf126036e8d1a  smf_2-0-rc4_install.zip

I can't find any pages on the website that publish expected checksums.

EDITED: Oh yeah, there's an extra 0 at the end of the document:

</div>
</body></html>
0

For what it's worth you can see the numbers in Firefox too while the page is loading.

I Agree

#10
If anyone is still following this....

I noticed today the numbers etc only seem to appear when logged out / in guest mode.

That definitely explains why I was not always seeing them before ???


UPDATE: I thought maybe it was only affecting guest pages for a little while. But instead today it comes and goes. It may be more to do with something the host provider or one of my server neighbors is doing or dealing with. Will keep everyone up to date as I find out more maybe.

PS: Still seems like logged in pages may be immune.

I Agree

For the record, this has not gone away. And I'm pretty sure I've not seen it while logged in. I'm assuming something's amiss with the SMF release unless a file is corrupted. In which case an md5sum would be helpful.

Kays

Hi, this is a bit of a strange one which I've not seen before.

Have you tried using another theme?

Are there any errors in the server error log? I do suspect that the problem is server related.

Download the large upgrade package rather than than the install package. Then upload the files from it using an ftp client. Start with the files in the Sources folder overwriting the fles there. I'm suspecting that you don't have any mods installed yet. If the problem does appear on both themes then chances are it's not happening in any theme files.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

I Agree

Quote from: Kays on January 31, 2011, 08:57:11 AM
Hi, this is a bit of a strange one which I've not seen before.

Have you tried using another theme?

Are there any errors in the server error log? I do suspect that the problem is server related.

Download the large upgrade package rather than than the install package. Then upload the files from it using an ftp client. Start with the files in the Sources folder overwriting the fles there. I'm suspecting that you don't have any mods installed yet. If the problem does appear on both themes then chances are it's not happening in any theme files.

It happens with all themes. And no errors in the log. We've covered this I think, but just to keep things up to date.

I'd be happy to follow any instructions debugging wise. I don't want to deal with uploading files as you describe however. I used the large install package. Not webinstall. Uploaded the package and decompressed it on the server. It's possible it's corrupted, but I don't have official checksums. I suppose I could redownload it just to see if it matches, but I'd like to encourage you guys to provide official checksums and filesizes on the download page.

Still seems peculiar to be isolated to guest sessions. Which it does seem to be at this point. I've logged more than 24hrs getting the forum ready, and I'm pretty sure it's only happening as a guest now.

If there is some diagnostic setting I can flip or some simple technique to at least find out where in the code the numbers are coming from to help you guys I'd be happy to contribute to SMF that way. It is a little peculiar that the numbers bookend the document. Might suggest it's more of an encoding thing or something than some stray output.

PS: Still haven't installed any mods, but will probably have to start doing that at some point. Would like to get this cleared up.

SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

I Agree

Quote from: SlammedDime on January 31, 2011, 10:10:11 PM
Give this a shot... What is file_check.php?

If you think this might turn up corruption, that might not hurt. I suspect though we're probably looking at a bug in the current download archive, because it only seems to happen with guests. The fact that only Google Chrome tends to really display the bug might have kept it hidden pretty well for all this time... I'm guessing whatever causes it probably doesn't happen in all or maybe even most environments.

UPDATE:

Quote from: file_check.php?
/home/xxx/webapps/www/share/smf2.0/Themes/core/index.php

    * File does not begin with <?php
    * File does not end with ?>

Dunno if that is normal. I'm guessing the script stopped there, because the theme I am using is copied from Core. Problem happens with default/curve theme as well for the record. FYI: My index.php generates images just fine.

I Agree

^Actually, I checked, and core/index.php is a 0 sized file. The directory I cp -R 'd from core has a nonzero sized index.php (217 bytes) but opened it's empty. Default has a 217 byte index.php which is not empty / looks fine.

Hmmm. the archive I downloaded last night is not this way. Seems like corruption of some kind. It's a wonder the forum works so well otherwise if so :o

Advice? I'm going to have to keep all the theme files I've customized during the last week at least.


EDITED: The original download I have on my local machine seems fine too with respect to the index.php files. So seems like something must've happened either during the upload or unpacking. If the unpacking was bad, it happened both times, whatever gives.

EDITED: Checksums all match. Will see what the files look like directly after unpacking when I can. If bad I  will have to take this up with my host provider... if not it would seem like somehow SMF (whether at fault or not) is overwriting the index.php files (if that's even possible)

PS: After replacing the index.php file, for the time being I'm no longer seeing the text. But it has come and gone before. Mostly come.

I Agree

UPDATE: I have some new information on this...

Apparently it happens when the forum is put into maintenance mode. Somehow the index.php file is getting clobbered / hopefully nothing else is going on :-\



EDITED: What's weird is it's the core/index.php file that gets clobbered. Not "default" and even though core is not the theme in use ???

Anyway, there is definitely a bug here somewhere...

kat

As it only shows in maintenance mode, at least it's not "Mission critical".

Does this thing show on every page?

I was gonna ask if non-admins can see it, but they can't if it only shows in Maintenance mode, so that's pretty pointless to ask. ;)

I Agree

Quote from: K@ on April 13, 2011, 04:25:53 PM
As it only shows in maintenance mode, at least it's not "Mission critical".

Does this thing show on every page?

I was gonna ask if non-admins can see it, but they can't if it only shows in Maintenance mode, so that's pretty pointless to ask. ;)

Well guests can see it on the Maintenance Mode screen of course. In fact as I recall, it tended to always show for guests for whatever reason. And sometimes show for admin.

Since I'm not sure the extent of the damage its doing (it's only known to be zeroing out the index.php file in the core theme folder) I'm a little hesitant to subject my install to it at this point, but most likely any damage (if any) has already been done.

I'd say the definite way to reproduce it is to install RC4 (assume it's not been fixed / have not upgraded myself) and clone (cp -R) the core theme folder, making a new theme. Then set the forum to the new theme. Then put the forum in maintenance mode. At that point the core/index.php file becomes 0 size.

If that doesn't give you a sense of where the bad code might be, you might have to try for yourselves. Good luck. I'd feel better about SMF knowing its crew is up to tracking this kinda thing down.

PS: It happens when you put the forum in Maintenance Mode for the first time. You're pretty much stuck with it at that point until you figure out what's happened.

Advertisement: