Advertisement:

Author Topic: applying smf patches...php not acceptable?  (Read 781 times)

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
applying smf patches...php not acceptable?
« on: January 11, 2019, 09:19:51 AM »
Lets start this with "I am not tech savvy and may appear really really dumb at any moment..."

I finally got around to applying update patches today
...installed one after another, the suggested updates, to smf.
Easy peesy.
Now at version 2.0.13

When I tried to apply 2.0.14, I got an error stating that my php was not 5.3 as it needed to be.
I checked the ph in my aquarium, its fine.

I don't know what a php is....or how to change it.

Heres a couple of screengrabs with info:
first is the basics for my forum
and second is the php screen at my cpanel (another place where I am lost! lol)

Can anyone explain some of this and what I should (if anything)? Thanks.


Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #1 on: January 11, 2019, 09:21:10 AM »
It would be in cpanel an option to change your PHP version you would need to be on at least php 5.4
Or if you unsure try contact your web hosting company and see if you can upgrade to php 5.4
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 airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #2 on: January 11, 2019, 09:33:00 AM »
when I went into cPanel, I saw a php section, which I clicked on...thats the screengrab I showed above.
I don't see anything else...but I'll go hunt around a little more.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,414
Re: applying smf patches...php not acceptable?
« Reply #3 on: January 11, 2019, 09:41:08 AM »
that is your database management tool. you need to reach out to your host.

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #4 on: January 11, 2019, 09:45:26 AM »
okay, I went deeper and found the page where you update the php (I think)
screengrab below.

lol forgive me...it might as well be written in chinese.
all I see is the word "caution" and I panic. lol

I hear your suggestion (contact the host)....or can I fix it here?
I think I am supposed to choose 5.4 default and click update...right?

your help is really appreciated.

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,046
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: applying smf patches...php not acceptable?
« Reply #5 on: January 11, 2019, 10:30:45 AM »
That should be it, 5.6 would probably be cool. :)
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #6 on: January 11, 2019, 10:55:40 AM »
Just to confirm (can you hear my trepidation?)..

I'm going to leave it at 5.4 default and click the Update button...right?
This is not going to destroy my forum?
lol

and I am concerned about choosing the 5.6 option...since it says "caution"

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #7 on: January 11, 2019, 11:01:43 AM »
Nah won't your hurt forum you are on SMF 2.0.13 you can move up to 5.6
Then upgrade to SMF 2.0.15 then move to PHP 7.1
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 airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #8 on: January 11, 2019, 11:09:20 AM »
great...forum is gone

http://papermodelforum.com/ [nofollow]

I opted for the stable 5.6 and clicked update.
Now I can't connect to the forum.
I went back into cPanel and changed it to 5.4 default and clicked update.
Still no forum.

What has happened?

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #9 on: January 11, 2019, 11:13:49 AM »
Hmm I see your forum up at
http://cutandfold.info/cutandfoldforum/
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

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #10 on: January 11, 2019, 11:16:07 AM »
I think the issue is you are including SMF in an iframe. which the new SMF versions prevent

You can either do a redirect intead of an iframe for http://papermodelforum.com/

Or remove this code from your forum's index.php file
Code: [Select]
// Emit some headers for some modicum of protection against nasties.
if (!headers_sent())
{
// Future versions will make some of this configurable. This is primarily a 'safe' configuration for most cases for now.
header('X-Frame-Options: SAMEORIGIN');
header('X-XSS-Protection: 1');
header('X-Content-Type-Options: nosniff');
}

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 airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #11 on: January 11, 2019, 11:22:08 AM »
LOL you are speaking greek.
I have no idea what you just said.

if i type my (masked) domain name www.papermodelforum.com [nofollow]...the forum does not connect.
(it says can't connect to cutandfold.info)

if I access the forum via the full address (http://cutandfold.info/cutandfoldforum [nofollow]) it works.

Only thing i have done in the last 5 minutes is click that "update php to 5.4

I don't know what "including SMF in an iframe" means...or what an iframe is?

This "do a redirect instead of an iframe" is even more confusing?

Removing code? I'm lost.

...
the forum still works...just can't access it using the domain name.
Could it be the domain name needs to dns server update because of some changes to the forum site?
The forum address is still the same though?..and the domain name just directs to an address I specify?


Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #12 on: January 11, 2019, 11:25:14 AM »
If it is masked at a domain registration place can you just either forward instead using url forwarding feature on the domain.

The other option is we can change the code. If you feel comfortable you can pm your cpanel info and I can make the change in your forum's index.php to remove the check.
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 airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #13 on: January 11, 2019, 11:30:04 AM »
Forgive me...I just wanna understand the best I can.

I have a domain name...and it is masked...and directed at an address.
The address hasn't changed.

In fact, if you type the address, the site is there and still works fine.

So why does the domain name not take you there any more?
I haven't changed the address or anything at fxdomains (the site where my domain name resides).

I don't see why I need to change anything on the forum site.?
Unless we have somehow changed the forum address? which we haven't...?

I checked at fxdomains, the directed address for the domain name.
It is correct...and if i test it, it works.
And yet...if I type www.papermodelforum.com [nofollow] into my browser, it says cutandfold.info wont connect.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #14 on: January 11, 2019, 11:34:38 AM »
It's security SMF 2.0.13 to help reduce hackers.
This line specifically header('X-Frame-Options: SAMEORIGIN');
In your forum's index.php prevents the forum from being masked using iframe. It will work with a url redirect but not a mask unless you remove that line of code.

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

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,046
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: applying smf patches...php not acceptable?
« Reply #15 on: January 11, 2019, 11:35:32 AM »
I do believe your forum is in place X which used to be shown inside a frameset in place Y,
for security reasons SMF prevents this in current versions.
Easiest route would be to just remove the code that does this, and that is what vbgamer offered to do for you.

EDIT: Ninja'd by vbgamer ;)
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #16 on: January 11, 2019, 11:38:32 AM »
ahhhhh I think I understand you now.

the connection is there, but at the forum end it ends up being blocked because of the masking.
ahh I get it. a security thing.

thank you for more explanation.
I really do appreciate your patience with me.
eventually I wrap my brain around this stuff...but it takes a lot head bashing.

okay...so where is the forum index php file? and I will try to change this code.

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #17 on: January 11, 2019, 11:40:24 AM »
in the cpanel file manager go to your smf forum and find the index.php in the main directory.
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

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,046
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: applying smf patches...php not acceptable?
« Reply #18 on: January 11, 2019, 11:40:33 AM »
It is the forum root, so the file that this address points to http://cutandfold.info/cutandfoldforum/index.php
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #19 on: January 11, 2019, 11:44:00 AM »
I'm in file manager...and I think I see it.
there are 2 of them.

how do I access it...change it? this is the part I don't understand.
if i click the name, it does nothing.
if i double click, it downloads something.

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #20 on: January 11, 2019, 11:45:32 AM »
okay, right click and choose edit.

first option is the "character encoding" it is set to utf-8 right now, but theres a whole long list of choices

I already downloaded the thing, so I guess thats my emergency backup?

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,046
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: applying smf patches...php not acceptable?
« Reply #21 on: January 11, 2019, 11:45:54 AM »
In the menu above, there's "Edit". And select the one you have selected in the picture, the other one with the ~ in the end is a backup copy.

EDIT:
Okay, you found it - now in this section

Code: [Select]
// Future versions will make some of this configurable. This is primarily a 'safe' configuration for most cases for now.
header('X-Frame-Options: SAMEORIGIN');
header('X-XSS-Protection: 1');
header('X-Content-Type-Options: nosniff');

Just comment out the first header row.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #22 on: January 11, 2019, 12:01:06 PM »
   "Just comment out the first header row."
Sorry...I don't know what this sentence means.

Are you saying to delete the first row of text?
Line 105?
How do I delete it?

This is what I see:

104    // Future versions will make some of this configurable. This is primarily a 'safe' configuration for most cases for now.
105   header('X-Frame-Options: SAMEORIGIN');
106   header('X-XSS-Protection: 1');
107   header('X-Content-Type-Options: nosniff');

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,071
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: applying smf patches...php not acceptable?
« Reply #23 on: January 11, 2019, 12:02:32 PM »
Just remove the whole line
header('X-Frame-Options: SAMEORIGIN');
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 airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #24 on: January 11, 2019, 12:10:03 PM »
just highlight and delete the text?

now its just a blank site at line 105.

okay, I hope I haven't messed things up. lol

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,046
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: applying smf patches...php not acceptable?
« Reply #25 on: January 11, 2019, 12:10:25 PM »
Or what I meant, save it for future so you know what you "removed" and add // in front of it. :)

So

104    // Future versions will make some of this configurable. This is primarily a 'safe' configuration for most cases for now.
105   // header('X-Frame-Options: SAMEORIGIN');

Both work.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline airdave

  • Semi-Newbie
  • *
  • Posts: 20
Re: applying smf patches...php not acceptable?
« Reply #26 on: January 11, 2019, 12:16:11 PM »
lol don't tell me things AFTER I have deleted stuff!!!! LOL

anyway, I just checked the domain www.papermodelforum.com [nofollow], and it works again!!!!
So thats all that matters.

I apologize for my ignorance.
I get by with most things, but when people start telling me what to do in tech-speak, I get totally lost.
You guys think its plain and simple, but to me it an alien language!

anyway, thanks again for your assistance.
Its really appreciated.

Online Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,046
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: applying smf patches...php not acceptable?
« Reply #27 on: January 11, 2019, 12:19:16 PM »
I apologize for my ignorance.
I get by with most things, but when people start telling me what to do in tech-speak, I get totally lost.
You guys think its plain and simple, but to me it an alien language!
No need to apologize, we've all been there once. And that's what we're here for :)
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas