Upgrading from 2.3.6.0 to 2.4.8 - deprecated:non-static method etc

I’m trying to upgrade an instance from 2.3.6 to 2.4.8 in order to then upgrade to v3.x in order to export the journal for inclusion in another v3 instance. The server has both php v5.4 and php v7. If I check via phpinfo prior to upgrade it states v5.4 is in use. However when I run the upgrade via the command line I’m getting the following errors:

Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in XXXXXXXXX/lib/pkp/classes/core/PKPApplication.inc.php on line 545

Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in XXXXXXXXX/lib/pkp/classes/core/PKPApplication.inc.php on line 513

Fatal error: Cannot use ‘String’ as class name as it is reserved in XXXXXXXXX/lib/pkp/classes/core/String.inc.php on line 57

These seem to imply that it’s picking up php v7. is there any way to force it to use v5.4?

Many thanks

Hi @Salah_Ismaeel_Yahya,

what do you get when you type php -v? Is it possible you have different versions of PHP running between your CLI and your web server?

thank you! it is showing V 7 in CLI. I can take a screenshot and show the relevant team the problem now.

That’s done the trick I think. I’m getting different issues post upgrade now but they probably warrant a different thread.