HTP Error 500, OJS 2.4.6. [11-Feb-2018 10:45:25 UTC] PHP Fatal error: Cannot use 'String' as class name as it is reserved

Hi there,
We are using OJS 2.4.6, our journal site suddenly stopped working and after reviewing the error log below was noted be potential cause:

[11-Feb-2018 10:45:25 UTC] PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in /home/maftree/public_html/eja/lib/pkp/classes/core/String.inc.php on line 57

Our journal is hosted on shared linux server which is using PHP Version, 5.6.32. Any possible help is much appreciated.

Thanks

I have spoken to our shared server hosting provider, apparently they have recently upgraded to PHP 7. We used MultiPHP Manager under the Cpanel then set the php to php560 which did get the journal site back on working. Bit relieved. Thought of sharing.

Hi @hamsavijay,

When you’re ready to upgrade to OJS 3.x, it’s PHP7 compatible.

Regards,
Alec Smecher
Public Knowledge Project Team