My older installation for some reason started giving a 500 error, so I took the plunge and updgraded to the latest OJS version (3.3.0-3).
However, on a vanilla installation, I keep getting the folllowing:
Parse error : syntax error, unexpected ‘class’ (T_CLASS) in /home3/****/public_html/ojs/lib/pkp/classes/core/PKPApplication.inc.php on line 230
Unfortunately, I cannot seem to get past this
Any help please, as our Journal is down
thanks
I also have the same error:
Parse error : syntax error, unexpected ‘class’ (T_CLASS) in /home/…/ojs/lib/pkp/classes/core/PKPApplication.inc.php on line 230
Hello
I have the same error
Parse error : syntax error, unexpected ‘class’ (T_CLASS) in …/lib/pkp/classes/core/PKPApplication.inc.php on line 230
How can I solve it?
Thank you
Hi all,
Your PHP version is probably too old; check docs/README.md for system requirements.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi, I have the same error. I have checked my PHP version is 7.4. The path I have applied is OJS upgrade from 2.7.1 to 2.8.5 then to 3.0 and finally 3.0 to the latest release. The latest release showing this error.
From backup, I have tried upgrading from 2.8.5 to latest release and having the same error:
[21-Jul-2021 23:45:30 UTC] PHP Parse error: syntax error, unexpected 'class' (T_CLASS) in /home/fatimatu/public_html/mayfeb/lib/pkp/classes/core/PKPApplication.inc.php on line 230
Hi, i´m having the same error upgrading from 3.1.1.2 to 3.3.0-7
I have PHP 7.4 installed on my server.
Any idea what is happening?
Regards
Victor
My issue is resolved. Although I selected PHP 7.4 from cPanel however, I had .htaccess file on my installation directory which changed PHP version. I changed .htaccess file 
My issue is resolved. Although I selected PHP 7.4 from cPanel however, I had .htaccess file on my installation directory which changed PHP version. I changed .htaccess file 
I also have the same error:
Parse error : syntax error, unexpected ‘class’ (T_CLASS) in /home/…/ojs/lib/pkp/classes/core/PKPApplication.inc.php on line 230
I have PHP 8.1 installed on my server.
@Jerson_Lz
Version 3.3.0.3 is not compatible with PHP8.1. I believe this support was added in a later build, not sure which one. The latest release should be compatible.
Hi @Jerson_Lz and @gaziyucel,
@Jerson_Lz, I suspect your PHP version is actually much older than you think it is. Based on the error message you are probably using PHP 7.2 or older. Depending on how your server is configured, you may need to restart Apache in order to change the PHP version; alternately, if you’re trying to upgrade from the command line, double-check your command-line PHP version with:
php --version
Regards,
Alec Smecher
Public Knowledge Project Team