PHP Fatal error on installing OJS 3.2.1-2

Hi,

I am trying to install OJS 3.2.1-2 and I used xampp to open phpmyadmin and create a new database. When I typed “localhost/ojs” on URL, this page showed localhost is currently unable to handle this request (HTTP ERROR 500).
Error log messages " [Wed Dec 23 21:38:33.574872 2020] [php:error] [pid 28120:tid 1888] [client ::1:63343] PHP Fatal error: Cannot declare class XMLParser, because the name is already in use in D:\xampp\htdocs\ojssite\lib\pkp\classes\xml\XMLParser.inc.php on line 28
"
I am not sure how to rename XMLParser to fix it. Please give my some guides.

image

Thanks,
Summer

1 Like

Hi @summer

Is the php version PHP 8.0 ?
Regards,

Hi @drugurkocak
Thank you for answering.
Yes. When I went “http://localhost/dashboard/phpinfo.php” on URL, the page showed PHP Version 8.0.0.

Hi,

I also faced a similar problem during installing OCS.
Fatal error: Uncaught Error: Non-static method PKPApplication::getApplication() cannot be called statically in D:\xampp\htdocs\ocs-system\index.php:64 Stack trace: #0 {main} thrown in D:\xampp\htdocs\ocs-system\index.php on line 64

How can I rename to fix this problem?

I have the same problem, using postgres and php 8. Did you manage to solve it?

@asmecher, Does OJS 3.2 work with postgres and php8?

Regards,

Hi @Adriano_Jose,

See issue 6751 for information on the XMLParser class name collision with PHP8.

We’ll be releasing OJS/OMP/OPS 3.3.0-4 in the next couple of weeks with this fix included to add PHP8 support; in the meantime I’d suggest using an older version of PHP. (If you’re comfortable hosting from github, you can check out the stable-3_3_0 branch, which has the fix included.)

We don’t currently have plans to back-port the changes to OJS 3.2.x or earlier, as PHP8 does not yet have an appreciable install base.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like