OCS unavailable after PHP upgrade

Hi,
After we upgraded our PHP to 7.2, we are not able to access OCS anymore. This is the error we get:

Deprecated : Methods with the same name as their class will not be constructors in a future version of PHP; Application has a deprecated constructor in /srv/www/vhosts/media-management.eu/httpdocs/ocs/classes/core/Application.inc.php on line 30

Deprecated : Methods with the same name as their class will not be constructors in a future version of PHP; PKPApplication has a deprecated constructor in /srv/www/vhosts/media-management.eu/httpdocs/ocs/lib/pkp/classes/core/PKPApplication.inc.php on line 24

Fatal error : Cannot use ‘String’ as class name as it is reserved in /srv/www/vhosts/media-management.eu/httpdocs/ocs/lib/pkp/classes/core/String.inc.php on line 57

Does anyone know how to solve this?
I hope someone can help us!
Thank you in advance!

Hi @bianca

You’ll need to either upgrade OCS, or downgrade PHP. Newer versions of PHP have a reserved class called “String” that breaks older versions of OCS and OJS.

Cheers,

Hi all,

FYI, The current version of the stable branch in git (ocs-stable-2_3_6) works with PHP7; if you want to use OCS with PHP7 you’ll need to check that version out from github.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you! we downgraded PHP for now, that seems to do the trick!
Cheers!

Thanks for this suggestion. Will check it out asap!
Grtz!