OJS 3.2.1 upgrade PHP compatibility issue

Hi, new OJS user here with limited technical proficiency. This question is about PHP compatibility during an upgrade from OJS 3.1 to 3.2.

I have OJS installed with PHP 7.0.25 (a default from my server host [Host Gator] that sunset PHP 5) and am trying to upgrade to OJS I’ve followed the instructions (https://pkp.sfu.ca/ojs/UPGRADE) on copying Public/ and config.ini to the new intended directory, updating config.ini with new elements from the latest config TEMPLATE while keeping site-specific information, and replacing the old OJS directory with the new one. I used Install = Off (since I don’t have terminal access) and got to the installation page. However, the installation page identifies my PHP as 7.1.14 and as inadequate to continue with installation (notably different than the default PHP version). I then go to my web host and change the PHP version to 7.2 (or 7.3, 7.4, even tried 7.1.33 and 7.0.33). (Not sure if it’s relevant, but the global PHP version is still 7.0 across the board on my host; I just set the OJS site to 7.2+). Afterwards, the installation page no longer loads (INTERNAL SERVER ERROR 500 or for 7.4, Deprecated: Directive ‘allow_url_include’ is deprecated in Unknown on line 0). I check the error logs, which have the following (excerpted):

[20-Jan-2021 20:15:43 UTC] PHP Warning: PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20160303
PHP compiled with module API=20170718
These options need to match in Unknown on line 0
[20-Jan-2021 14:15:43 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function mysqli_query() in XXXXX
[20-Jan-2021 14:15:48 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in XXXXX

I found an old forum post about fatal errors related to json_ecode() (Fatal error installing ojs 3.2.0-3) and showed it to my server IT support, who basically said it wasn’t relevant to the issue.

The mysqli thing also is odd to me since 3.1 is config’d with mysqli.

I looked to see if there was some htaccess thing I could toggle to enable a more contemporary PHP, but admittedly I didn’t fully understand if it was a solution.

What might I be doing wrong here? I’ve previously upgraded from 2.X to 3.X and through the early versions of 3.X without this issue, so I wonder if I’d forgotten a step or something. In the end, I just restored my old OJS 3.1 directory until I figure out what’s going on.

Thank you for any insights! Clarifying questions also welcome!

Hi @kchen
There are a few similar discussions about the error message, and in summary, it is 99% a server configuration error.

Common result in these discussions is that php modules are not compatible (behind the php version) with their php version.

I hope your problem will be solved soon.