[OJS 2] Some errors from OJS 2.4.8-5 and PHP 7.2

Hello.

I had to migrate OJS 2 to dedicated server with PHP 7, Why? i don’t know.

I could fix some things with the great help forum

SimplePie

Roundedcorners

But i have some errors, that “blank page”

2020/05/11 15:53:51 [error] 46806#0: *127655 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Non-static method PKPApplication::defineExposedConstant() should not be called statically in /var/www/********/www/lib/pkp/classes/core/PKPApplication.inc.php on line 545
PHP message: PHP Deprecated:  Non-static method PKPApplication::getExposedConstants() should not be called statically in /var/www/**********/www/lib/pkp/classes/core/PKPApplication.inc.php on line 513
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of GenericPlugin::manage($verb, $args, &$message, &$messageParams) should be compatible with PKPPlugin::manage($verb, $args, &$message, &$messageParams, $request = NULL)
  In file: /var/www/********/www/lib/pkp/classes/plugins/GenericPlugin.inc.php
  At line: 19
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of UsageEventPlugin::getManagementVerbs() should be compatible with GenericPlugin::getManagementVerbs($verbs = Array)
  In file: /var/www/********/www/plugins/generic/usageEvent/UsageEventPlugin.inc.php
  At line: 23
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of AcronPlugin::getManagementVerbs() should be compatible with GenericPlugin::getManagementVerbs($verbs = Array)
  In file: /var/www/*********/www/plugins/generic/acron/AcronPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of AcronPlugin::manage($verb, $args, &$message) should
2020/05/11 15:53:51 [error] 46806#0: *127655 FastCGI sent in stderr: "iver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of UsageStatsPlugin::getManagementVerbs() should be compatible with GenericPlugin::getManagementVerbs($verbs = Array)
  In file: /var/www/********/www/plugins/generic/usageStats/UsageStatsPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of ReportPlugin::manage($verb, $args) should be compatible with PKPPlugin::manage($verb, $args, &$message, &$messageParams, $request = NULL)
  In file: /var/www/********/www/classes/plugins/ReportPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of CustomBlockManagerPlugin::getManagementVerbs() should be compatible with GenericPlugin::getManagementVerbs($verbs = Array)
  In file: /var/www/********/www/plugins/generic/customBlockManager/CustomBlockManagerPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of WebFeedPlugin::getManagementVerbs() should be compatible with GenericPlugin::getManagementVerbs($verbs = Array)
  In file: /var/www/******/www/plugins/generic/webFeed/WebFeedPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration
2020/05/11 15:53:51 [error] 46806#0: *127655 FastCGI sent in stderr: "es/www/plugins/blocks/notification/NotificationBlockPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of UserBlockPlugin::getContents(&$templateMgr) should be compatible with BlockPlugin::getContents(&$templateMgr, $request = NULL)
  In file: /var/www/**********/www/plugins/blocks/user/UserBlockPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of NavigationBlockPlugin::getContents(&$templateMgr) should be compatible with BlockPlugin::getContents(&$templateMgr, $request = NULL)
  In file: /var/www/*************/www/plugins/blocks/navigation/NavigationBlockPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of SubscriptionBlockPlugin::getContents(&$templateMgr, $request) should be compatible with BlockPlugin::getContents(&$templateMgr, $request = NULL)
  In file: /var/www/***************/www/plugins/blocks/subscription/SubscriptionBlockPlugin.inc.php
  At line: 0
  Stacktrace: 
  Server info:
   OS: Linux
   PHP Version: 7.2.11
   Apache Version: N/A
   DB Driver: mysqli
   DB server version: 10.3.17-MariaDB
PHP message: ojs2 has produced an error
  Message: WARNING: Declaration of LanguageToggleBlockPlugin::getContents(&$templateMgr) should be compatible with BlockPlugin::getContents(&$templateMgr, $request = NULL)
  In file: /var/www/*********/www/plugins/blocks/languageToggle/LanguageToggle
2020/05/11 15:53:51 [error] 46806#0: *127655 upstream sent too big header while reading response header from upstream, client: 47.59.211.167, server: **************, request: "GET /index.php/******/about/editorialPolicies HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "domain*****", referrer: "https://***********/index.php/********/about/index"

Thanks

Hi @juanito,

The warnings are cosmetic and shouldn’t cause problems. I don’t see much else there except:

upstream sent too big header while reading response header from upstream, client: 47.59.211.167, server: **************, request: "GET /index.php/******/about/editorialPolicies HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "domain*****", referrer: "https://***********/index.php/********/about/index"

This appears to require some FastCGI configuration tweaking on your server; see e.g.: php - upstream sent too big header while reading response header from upstream - Stack Overflow

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hello @asmecher, thank you very much for your reply.

I tested adding buffer’ s parameters, but not.

It’s an multijournal installation.

Errors are when i click on, https://.es/index.php//about/contact → 502

But, with others journals (into multijournal) no errors.

Perhaps an old plugin 2.4.X with code incompatible with PHP 7?

Without warnings


2020/05/11 15:53:51 [error] 46806#0: *127655 FastCGI sent in stderr: "PHP message: PHP Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in /var/www/********/www/lib/pkp/classes/core/PKPApplication.inc.php on line 545 PHP message: PHP Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in /var/www/**********/www/lib/pkp/classes/core/PKPApplication.inc.php on line 513

2020/05/11 15:53:51 [error] 46806#0: *127655 FastCGI sent in stderr: "iver: mysqli
   DB server version: 10.3.17-MariaDB

2020/05/11 15:53:51 [error] 46806#0: *127655 FastCGI sent in stderr: "es/www/plugins/blocks/notification/NotificationBlockPlugin.inc.php

Thanks

Hi @juanito,

The 502 error is definitely coming from something outside of OJS – perhaps mod_security, FastCGI, or something else. Maybe check to see whether there’s another log that might explain it in more detail?

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thanks @asmecher .

I changed nginx for apache and works.

1 Like