Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: J.A.F.O. on January 29, 2022, 07:05:56 AM

Title: 2.0.17 --> 2.0.18 update. "./index.php Test failed"
Post by: J.A.F.O. on January 29, 2022, 07:05:56 AM
I was/am an admin at a forum I no longer frequent. Recently, they reached out to me to help resolve some issues they've been having with SMF.

It seems that the hosting provider updated the PHP installation on the server, and it broke the forum. (Basically, SMF hadn't been updated since my departure, and was on version 2.0.11.)

The hosting provider agreed to roll back to PHP version: 7.3.32, but this is obviously not a long-term solution.

Accordingly, after taking all necessary backups, etc, I started the process of incrementally getting the site up to date.

I've successfully gotten the site up as far as 2.0.17, but when I try to go to 2.0.18 the test-install fails. Checking the reason for the failure reveals this:

QuoteCode: (Find) [Select]

$forum_version = 'SMF 2.0.17';
@ini_set('memory_limit', '128M');

// Get everything started up...
define('SMF', 1);
if (function_exists('set_magic_quotes_runtime'))
    @set_magic_quotes_runtime(0);
error_reporting(defined('E_STRICT') ? E_ALL | E_STRICT : E_ALL);

Code: (Replace) [Select]

$forum_version = 'SMF 2.0.18';
@ini_set('memory_limit', '128M');

// Get everything started up...
define('SMF', 1);
if (version_compare(PHP_VERSION, '7.4.0') == -1 && function_exists('set_magic_quotes_runtime'))
    @set_magic_quotes_runtime(0);
error_reporting(defined('E_STRICT') ? E_ALL | E_STRICT : E_ALL);


So, if I'm interpreting this correctly, the failure is because the update is expecting a minimum PHP version of 7.4.0.

I assume that I need to inform the site owner that he needs to contact his hosting company, and get PHP updated before I can bring the site fully up to date.

Am I correct in my thinking, and is there anything else (unexpected "gotcha's" for example) that I need to be aware of before proceeding further?
Title: Re: 2.0.17 --> 2.0.18 update. "./index.php Test failed"
Post by: Arantor on January 29, 2022, 07:20:33 AM
No, the update is looking to add some code to index.php so *it* can check the version number on page load (because there is some checking it has to do every page)

The only way to fix this is to look at what's there and alter it to do the same job as what the 2.0.18 patch does as per Manual Installation of Mods (https://wiki.simplemachines.org/smf/Manual_installation_of_mods) or https://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: 2.0.17 --> 2.0.18 update. "./index.php Test failed"
Post by: J.A.F.O. on January 29, 2022, 07:33:12 AM
Quote from: Arantor on January 29, 2022, 07:20:33 AMNo, the update is looking to add some code to index.php so *it* can check the version number on page load (because there is some checking it has to do every page)

The only way to fix this is to look at what's there and alter it to do the same job as what the 2.0.18 patch does as per Manual Installation of Mods (https://wiki.simplemachines.org/smf/Manual_installation_of_mods) or https://wiki.simplemachines.org/smf/Error_in_mod_installation

Ahh.. I see. Thanks for the clarification!
Title: Re: 2.0.17 --> 2.0.18 update. "./index.php Test failed"
Post by: J.A.F.O. on January 29, 2022, 09:28:50 AM
Quote from: Arantor on January 29, 2022, 07:20:33 AMThe only way to fix this is to look at what's there and alter it to do the same job as what the 2.0.18 patch does as per Manual Installation of Mods (https://wiki.simplemachines.org/smf/Manual_installation_of_mods) or https://wiki.simplemachines.org/smf/Error_in_mod_installation
That did it.. (the memory limit having been upgraded to 256M is what was stopping it). The site is now fully updated.

Many thanks!