Advertisement:

Author Topic: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)  (Read 30627 times)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« on: March 20, 2015, 09:19:38 PM »
SMF 1.1 final was released in late 2006, which makes it a 8+ years old product.

While the foundations of the codebase remain very fast, stable and secure even by today's standards, the evolution of the technologies on which it is based (especially PHP and MySQL) has reached a point where it is no longer viable to fix incompatibilities.

Starting from PHP 5.5 and MySQL 5.6, your existing SMF 1.1.x setup will no longer function properly. Immediate symptoms are:
* Warnings (thousands in a short amount of time) in your error log, about a PHP deprecated function
Code: [Select]
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ...................* Wrong boards order in your Board Index

You should note that PHP has already reached version 5.6+ and the current version of MySQL is 5.7+, so it is very likely that your host will upgrade to more recent versions shortly.
If you still run SMF 1.1.x you should consider an upgrade to 2.0.x, with time to try to adapt things while everything still works, instead of trying to recover from an unusable forum if the current incompatibilities get worse with time. The chances are that further changes to PHP/MySQL will render 1.1.x unusable in a not so distant future.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,101
    • @studyforceps on Twitter
    • Study Force
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #1 on: February 19, 2016, 02:42:10 PM »
Many of us are waiting for SMF 2.1. Until then, any work done on 2.0.x is futile in my opinion.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #2 on: March 17, 2016, 02:41:49 PM »
1.1.x will work fine on  php 5.5
Here is a quick change to fix all notices.

open index.php change
Code: [Select]
error_reporting(E_ALL);
To
Code: [Select]
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);

open ssi.php
Change
Code: [Select]
$ssi_error_reporting = error_reporting(E_ALL);
To
Code: [Select]
$ssi_error_reporting = error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);

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 Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,081
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #3 on: March 17, 2016, 02:45:26 PM »
that just hides the problem, it does not actually fix the issue.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #4 on: March 17, 2016, 03:00:11 PM »
and the reason you get the deprecated warning is because the function will soon be completely removed instead of just deprecated
 - so, hiding the warning will get you a short time of function - all the while you are digging yourself deeper into a hole when you will eventually HAVE to upgrade in a short time instead of a planned migration.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #5 on: March 17, 2016, 03:02:16 PM »
I understand. It still works which I am going to use for my sites I rather be on the new php version then on an old php version for now.
Was forced today since openssl needed to be updated for paypal.
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 Study Force

  • SMF Hero
  • ******
  • Posts: 3,101
    • @studyforceps on Twitter
    • Study Force
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #6 on: March 17, 2016, 04:27:22 PM »
I understand. It still works which I am going to use for my sites I rather be on the new php version then on an old php version for now.
Was forced today since openssl needed to be updated for paypal.

What do you mean, PayPal requires version 5.5?

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #7 on: March 17, 2016, 04:40:37 PM »
For the new updates they are doing requires latest openssl to support the right SSL connection types. They are doing a lot of updates that take affect june this year I been getting their emails.
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 Study Force

  • SMF Hero
  • ******
  • Posts: 3,101
    • @studyforceps on Twitter
    • Study Force
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #8 on: March 17, 2016, 04:47:09 PM »
For the new updates they are doing requires latest openssl to support the right SSL connection types. They are doing a lot of updates that take affect june this year I been getting their emails.

Thanks for the info. On a side note, I still can't believe they haven't been overtaken by their competitors (really, really hate PayPal).

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,152
    • @fragicide on Twitter
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #9 on: March 17, 2016, 04:49:17 PM »
Thanks for the info. On a side note, I still can't believe they haven't been overtaken by their competitors (really, really hate PayPal).

I agree, but PayPal will be around for the foreseeable future. But I much prefer Amazon Payments over PayPal.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,101
    • @studyforceps on Twitter
    • Study Force
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #10 on: March 17, 2016, 04:55:41 PM »
I remember looking into Amazon payment, only problem was they weren't available globally - only for US residents.

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,152
    • @fragicide on Twitter
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #11 on: March 17, 2016, 05:00:57 PM »
I remember looking into Amazon payment, only problem was they weren't available globally - only for US residents.
I could be wrong, but I do believe they have expanded into other countries.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,101
    • @studyforceps on Twitter
    • Study Force
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #12 on: March 17, 2016, 05:09:52 PM »
I remember looking into Amazon payment, only problem was they weren't available globally - only for US residents.
I could be wrong, but I do believe they have expanded into other countries.

True, but not Canada: Checkout by Amazon is currently available to sellers in the United States, the United Kingdom, Germany, and Luxembourg.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #13 on: March 26, 2016, 09:42:01 PM »
One other change to make
In index.php
Find
Code: [Select]
set_error_handler('error_handler');
Change to
Code: [Select]
set_error_handler('error_handler',E_ALL & ~E_DEPRECATED & ~E_NOTICE);
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 Veric

  • Newbie
  • *
  • Posts: 1
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #14 on: May 09, 2016, 04:47:48 AM »
I just registered to say thank you!
I have an older forum that has been left running for a number of years with a small membership, so never really seen the need to upgrade as it just 'works'.

The recent PHP change by my host threw me in the deep end, but now it's back up and running for now.
I now know I have no choice but to look at upgrading it, which is a shame as I like my forum's layout, mods, customization etc:

At least your fix has bought me some time to investigate just how to upgrade 1.1.21 to latest.
I'm just disappointed that I need to upgrade, site's been up for close to 10 years and only now has it 'broken'.

Many thanks for you help.

Also to anyone needing to upgrade to 1.1.21 from an older version, if your admin control panel does not let you upgrade the normal way:

1) Click the normal upgrade link, when you get the errors look at the address bar and you'll see the URL for the .zip file for the 1.1.20/1.1.21 file.
2) Browse to this manually and download the file.
3) You can then manually go to package manager, upload the .zip and apply it without getting the error messages stopping you. Note you may need to rename the zip with something on the end if it says the file already exists. For example I renamed mine from 'smf_patch_1.1.21_2.0.10' to 'smf_patch_1.1.21_2.0.10-2' to then upload and apply it.

One other change to make
In index.php
Find
Code: [Select]
set_error_handler('error_handler');
Change to
Code: [Select]
set_error_handler('error_handler',E_ALL & ~E_DEPRECATED & ~E_NOTICE);

Offline Alex - A2Hosting

  • Jr. Member
  • **
  • Posts: 258
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #15 on: May 11, 2016, 05:19:33 PM »
I just registered to say thank you!
I have an older forum that has been left running for a number of years with a small membership, so never really seen the need to upgrade as it just 'works'.

The recent PHP change by my host threw me in the deep end, but now it's back up and running for now.
I now know I have no choice but to look at upgrading it, which is a shame as I like my forum's layout, mods, customization etc:

At least your fix has bought me some time to investigate just how to upgrade 1.1.21 to latest.
I'm just disappointed that I need to upgrade, site's been up for close to 10 years and only now has it 'broken'.

Many thanks for you help.

Also to anyone needing to upgrade to 1.1.21 from an older version, if your admin control panel does not let you upgrade the normal way:

1) Click the normal upgrade link, when you get the errors look at the address bar and you'll see the URL for the .zip file for the 1.1.20/1.1.21 file.
2) Browse to this manually and download the file.
3) You can then manually go to package manager, upload the .zip and apply it without getting the error messages stopping you. Note you may need to rename the zip with something on the end if it says the file already exists. For example I renamed mine from 'smf_patch_1.1.21_2.0.10' to 'smf_patch_1.1.21_2.0.10-2' to then upload and apply it.

Who is your hosting provider and what control panel are they providing you? Most providers in the shared market should offer you the ability of selecting your own PHP version (Including PHP 5.2, 5.3, 5.4 etc) . You should see something like a 'Select PHP Version' icon in your control panel if your web host offers it.

Whilst it is recommended you stay up to date, this might be an option worth considering.
Alex - alex@a2hosting.com

Offline knagl

  • Semi-Newbie
  • *
  • Posts: 28
  • Gender: Male
    • Las Vegas Advice Message Forum
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #16 on: August 10, 2016, 01:34:39 AM »
Who is your hosting provider and what control panel are they providing you? Most providers in the shared market should offer you the ability of selecting your own PHP version (Including PHP 5.2, 5.3, 5.4 etc) . You should see something like a 'Select PHP Version' icon in your control panel if your web host offers it.

Whilst it is recommended you stay up to date, this might be an option worth considering.

Hey, thanks for posting this.  My webhost gives me the cPanel interface, and sure enough there was that option in there.  It looks like they recently upgraded to 5.6, but with that option in the control panel I was able to downgrade back to 5.4.  Obviously I know I need to bite the bullet and start figuring out how to upgrade to SMF 2.x, but at least my forum is back to normal functionality for a while so I can upgrade at my convenience, rather than having to do it tonight.

Offline equinoxmatt

  • Charter Member
  • Semi-Newbie
  • *
  • Posts: 20
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #17 on: August 25, 2016, 08:37:54 AM »
is SMF 1.x still officially supported?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: SMF 1.1.x incompatibility with recent PHP versions (PHP5.5+)
« Reply #18 on: August 25, 2016, 08:44:52 AM »
only barely - there will, however, be no further releases of the 1.1.x branch
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.