News:

Join the Facebook Fan Page.

Main Menu

"?>"!!!

Started by KensonPlays, January 30, 2010, 06:34:03 PM

Previous topic - Next topic

Norv

file_check.php could be modified to search for these occurrences, actually. It wasn't made to do it, but since this seems to be useful seeing these reports, it could be made to.
Bigguy, could you please eventually attach your file or tell what mods modified it? It might be useful to understand how come it happened (I haven't seen other cases than these reported here, yet).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Bigguy

Which file do you want attached. ??? The file that had the extra ?> in it was the ManageSearchEngines.php file. I really doubt any of the mods I have installed modified that file. I can list them later though if you like.

Norv

Yes, that one, please... I am thinking that a mod may have the wrong edit or some problem while installing a mod may lead to the double ?>. I don't really see how else it can get there, unless a mod did indeed modify the file. Or do you remember ever having modified manually this file, perhaps?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Arantor

As for finding them, easiest solution I know is to have all the files locally, then tell Notepad++ to find ?> in .php files - you should only be getting one instance per file.

TheListener

I gave up looking for the >

It doesn't always appear anyway.

Bigguy

Quote from: Norv on March 04, 2010, 05:18:57 PM
Yes, that one, please... I am thinking that a mod may have the wrong edit or some problem while installing a mod may lead to the double ?>. I don't really see how else it can get there, unless a mod did indeed modify the file. Or do you remember ever having modified manually this file, perhaps?

No I have never modified that file. I have no reason to. Hold on and I will download the copy I am running now and a screenshot of mods.

Bigguy

Here ya go. All I did to the file was take out the extra ?>

Norv

#107
Thanks. However, it seems there are modifications in that file, comparing to a brand new RC2 version, this:
(RC2 version)

// Add a sorting column.
$smcFunc['db_add_column']('{db_prefix}spiders', array('name' => 'temp_order', 'size' => 8, 'type' => 'mediumint', 'null' => false));

(your file)

// Add a sorting column.
- $smcFunc['db_add_column']('spiders', array('name' => 'temp_order', 'size' => 8, 'type' => 'mediumint', 'null' => false));
+ $smcFunc['db_add_column']('{db_prefix}spiders', array('name' => 'temp_order', 'size' => 8, 'type' => 'mediumint', 'null' => false));

and, RC2 version:

// Remove the sorting column.
$smcFunc['db_remove_column']('{db_prefix}spiders', 'temp_order');

(your file)

// Remove the sorting column.
- $smcFunc['db_remove_column']('spiders', 'temp_order');
+ $smcFunc['db_remove_column']('{db_prefix}spiders', 'temp_order');

Is it because you made a diff yourself before posting the file?

Or, perhaps, it looks like this could be the cause: http://www.simplemachines.org/community/index.php?topic=340380
Please considering applying the patch posted by SD using a patch utility (I think WinMerge might work too, under windows, not sure though - I don't remember :) ), or simply grabbing a brand new RC2 file, it seems it was corrected meanwhile. This should be in the file:
Code (find) Select

// Add a sorting column.
$smcFunc['db_add_column']('{db_prefix}spiders', array('name' => 'temp_order', 'size' => 8, 'type' => 'mediumint', 'null' => false));

Code (find) Select

// Remove the sorting column.
$smcFunc['db_remove_column']('{db_prefix}spiders', 'temp_order');

That's all, there should be no extra ?> this way.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Bigguy

QuoteThe topic or board you are looking for appears to be either missing or off limits to you.

I can't get to where ever it was you wanted me to go with that link.

QuoteThanks. However, it seems there are modifications in that file

Why would there be, none of the mods I have modify that file, that I see. ???

Thanks for checkin that out. I will look into this this weekend for sure.

TheListener

Bigguy you asked me elsewhere for my index.css file.

Here it is.

Bigguy

Does it pertain to this topic. ??? I'm not sure why I asked you for that. It's better to post in the topic we were talking in, unless this is it, lol. :)

TheListener

will send a pm to explain why.

Norv

Quote from: Bigguy on March 05, 2010, 08:01:24 PM
QuoteThe topic or board you are looking for appears to be either missing or off limits to you.

I can't get to where ever it was you wanted me to go with that link.

QuoteThanks. However, it seems there are modifications in that file

Why would there be, none of the mods I have modify that file, that I see. ???

Thanks for checkin that out. I will look into this this weekend for sure.

Ah, really sorry about that! It didn't realize, since it's your own topic, in friends boards... I'm really sorry.
What is all about: It was a bug in an early version of SMF 2.0 (perhaps RC2 charter version, I suspect, or early version anyway), reported by you, tracked as:
http://dev.simplemachines.org/mantis/view.php?id=3831
When SD solved it, he also posted a .diff to apply. The original issue was about smileys, but the same bug existed in ManageSearchEngines.php (as you can see in the comment on the bug).
Seeing your file, it seems to me that your attached file contains in some way code from that diff, not applied correctly. As far as I can tell, no mod has edited it too, so simply replacing the file with a brand-new RC2 file should be just fine.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Bigguy

Thank you Norv for posting. I'll replace the file and take care of the issue.

Advertisement: