[OJS 3.1.2.0] more problems after upgrade

Capture

Can’t load random parts of site, until I restart IIS server and/or clear cache. Sometimes it is main menu, sometimes buttons… This doesn’t happens all the time, but often enough to be a problem. I have following errors in php error log:

[06-Jun-2019 08:39:28 Europe/Belgrade] PHP Fatal error: Cannot declare class Smarty_Internal_Compile_Private_Registered_Block, because the name is already in use in C:\inetpub\wwwroot\sitename\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_compile_private_registered_block.php on line 72
[06-Jun-2019 08:39:28 Europe/Belgrade] PHP Fatal error: Cannot declare class EditorReviewFilesGridHandler, because the name is already in use in C:\inetpub\wwwroot\sitename\lib\pkp\controllers\grid\files\review\EditorReviewFilesGridHandler.inc.php on line 62
[06-Jun-2019 08:39:28 Europe/Belgrade] PHP Fatal error: Cannot declare class SiteSettingsDAO, because the name is already in use in C:\inetpub\wwwroot\sitename\lib\pkp\classes\site\SiteSettingsDAO.inc.php on line 242

@asmecher Can you take a look, please? Thanks

Hi @Dragoljub_Djordjevic,

This isn’t something I’ve seen before… Are there any modifications to the code? Is it possible that the 3.1.2 code got mixed together with an older version somehow? Are you running any kind of PHP optimizer (e.g. Zend Optimizer, XCache, etc)? If you’re running an optimizer, try disabling it to see if it corrects the problem. It may be buggy.

Regards,
Alec Smecher
Public Knowledge Project Team

No, I am not running any optimizer. Code is changed, but it was working fine.
I have moved code to linux server couple of days ago, so far there are no errors, but with an empty database (only one journal).
Might be some windows server issues.

FYI:
Looks like issue was with PHP 7.2 and IIS server. I switched back to PHP 7.1, and for couple of days there are no problems.

Hi @Dragoljub_Djordjevic,

Hmm, interesting. Our automated testing infrastructure covers PHP7.2. What specific release of 7.2 were you using?

It’s entirely possible that you’re using an older 7.2 that has a bug that was already fixed.

Regards,
Alec Smecher
Public Knowledge Project Team

PHP 7.2.7, I’ll try to upgrade to PHP 7.3 when I find some free time.

Hi @Dragoljub_Djordjevic,

Just for a current example, see Travis CI - Test and Deploy Your Code with Confidence – at the moment that’s 7.3.2, and 7.2.16, and 7.1.11.

Regards,
Alec Smecher
Public Knowledge Project Team