2.0.17 to 2.0.18 Update - index.php and ManageRegistration.php Errors

Started by RobertSearcy, March 06, 2021, 06:01:06 PM

Previous topic - Next topic

RobertSearcy

I'm trying to update a forum from 2.0.17 to 2.0.18 and when I use the link to download the package to the server and then try to install, I get an Error in Package Installation message showing up.

Apparently the issue is stemming from 2 files - index.php and /Sources/ManageRegistration.php and the issue is occurring on step 2 "replace" on each.

Here's what I get when I open the popup to show the operation of each for the "step 2 replace":

index.php

$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);
$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);


/Sources/ManageRegistration.php

array('check', 'requirePolicyAgreement', 'text_label' => $txt['admin_privacy_policy'], 'value' => !empty($modSettings['force_gdpr']) ? 1 : $modSettings['requireAgreement'], 'disabled' => !empty($modSettings['force_gdpr'])),
array('warning', empty($policy) ? 'error_no_privacy_policy' : ''),
'',
array('check', 'requirePolicyAgreement', 'text_label' => $txt['admin_privacy_policy'], 'value' => !empty($modSettings['force_gdpr']) ? 1 : $modSettings['requirePolicyAgreement'], 'disabled' => !empty($modSettings['force_gdpr'])),
array('warning', empty($policy) ? 'error_no_privacy_policy' : ''),
'',


If it'll assist further, I have the following mods installed:

Simple Audio Video Embedder version 6.0.3
Inline Hover Spoiler version 1.5

This forum in question is not open to registrations and hasn't been for some time.

If it'll also help in any way, PHP version 7.2.33 is what's currently being used on the server and hosting account and I do have the option to change to PHP 7.4 within CPanel.  I did try doing that to see if that was the culprit to no avail and changed back to 7.2 afterwards after the error log started filling up with the following which I'll include even though I don't think it's related to the main issue at hand above:

Mostly....
8: Trying to access array offset on value of type null
.../public_html/Sources/Load.php


...with only one entry being this...
8192: Array and string offset access syntax with curly braces is deprecated
.../public_html/Sources/Register.php


The error logs stopped showing the above information once I changed the PHP version back to 7.2 within CPanel.

I'd like to avoid having to do the full, manual upgrade if at all possible and having to reinstall the referenced mods along with having to close the forum in question for a period of time while such is going on.  Is there a simple fix or idea to resolve the above?

Thank you all for any and all assistance!

Sir Osis of Liver

The errors mean package manager can't find the the target code, it's been edited by a mod.  You should be able to find it by searching the files, then make the changes indicated in the error popup.  2.0.17 does not support php 7.4, 2.0.18 does.  Nothing to do with the package manager errors, it just can't find an exact match for target code.  Backup the forum before you do any manual edits.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: