Can OCS work with PHP7.0?

OCS will require refactoring for PHP7 support similar to what was required for OJS and OMP. See this issue:

OCS 2.3.x will not work with PHP7.

Hi all,

We haven’t decided our plans for OCS yet. Once PHP 7.0 hits a reasonable deployment threshold we may assess minor changes to permit it to run on that platform, but haven’t done so yet.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi has this issue been resolved, please? PHP 7.2 is widely used now and we are planning change our hosting server which provides only PHP 7.2 on Debian 9

Hi @Dilan_Rostam,

The ocs-stable-2_3_6 git branch of OCS has been updated to work with PHP7.x; I’m not sure yet whether we’ll build a formal release, but you should be able to update to that branch without e.g. database changes or anything. (Just make sure you update from that branch both in the ocs repo and lib/pkp submodule.)

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you, This is too technical for us. Is there any instruction around please?

If you have any experience with git, you should be able to create a deployment via:

git clone https://github.com/pkp/ocs
cd ocs
git checkout ocs-stable-2_3_6
git submodule update --init --recursive

You could then use the files in the “ocs” directory as your install package, as with any other upgrade.

Without using git, you will be dependent on waiting for a formal release.

The Plesk 17 allow for adding extension Git which then pull auto any update and deploy that to the installation. I did this and it did not help :frowning:

I have now deployed this to the subdomain, and the nature of error log is changed, but I am not sure what it means,

Hi @Dilan_Rostam,

Something is referring to SubmissionSearch, but I don’t see any reference to it in the OCS codebase on the ocs-stable-2_3_6 branch. You can search for references by running e.g.:

 find /path/to/ocs -type f -exec fgrep SubmissionSearch "{}" ";"

…replacing /path/to/ocs with your OCS installation directory.

Regards,
Alec Smecher
Public Knowledge Project Team

Sorry my fault I have uploaded error message for the other treat I have on OJS, here is the error message I get after I have deployed the Git ,

ocs_git_update_error_log

Hi @Dilan_Rostam,

I still think your codebase isn’t properly updated with the latest code in the right branch or there is some old code hanging around. The latest ocs-stable-2_3_6 code doesn’t contain any references to PKPRole. As a start, I’d suggest flushing your template cache by removing all files from cache/t_compile. That may help.

Regards,
Alec Smecher
Public Knowledge Project Team

I cleared the cache of all files and pulled the GIT again and the error messages is the same :frowning:

This is my Git setting
ocs_git_update_setting

and This is error message I got after the new action

ocs_git_update_error_log2

Hi @Dilan_Rostam,

I think the lib/pkp submodule is on a different branch than the OCS repository.

Regards,
Alec Smecher
Public Knowledge Project Team

I am not sure what it means but the file error refer to is where it should be please see

ocs_git_update_error_log3

Hi @Dilan_Rostam,

It means you’ve checked out the OCS code from github in an incorrect/inconsistent way. The instructions @ctgraham send you above should do it correctly.

Regards,
Alec Smecher
Public Knowledge Project Team

I did that setting for Git module in Plesk to pull the update. Is that setting wrong?

Hi @Dilan_Rostam,

I’ve never used the Plesk git module, so I can’t help with that – but if you’re seeing warnings/errors relating to PKPRole, then there is definitely some incompatible code mixed in with your installation. The ocs-stable-2_3_6 branch contains no references to PKPRole in it.

Your question is more about git and branches than it is about OCS, so you might try looking at some documentation on those in particular.

Regards,
Alec Smecher
Public Knowledge Project Team

It is an easy module and here is a clear video how it works,

Is the Git deployment supposed to replace all files in my OCS directory? If so I can remove all the files and just Git to replace them.

Is it the Master Branch that needs to be pulled? The Git says
Branch: master; Automatic deploy to conferences.koyauniversity.org

and reports Last Commit info:
commit 2712144f1543366d13b100f953c0176cad6fdb97
Merge: edd6413c7 76415209b
Author: Alec Smecher alec@smecher.bc.ca
Date: Wed Aug 29 16:08:14 2018 -0700

Merge pull request #44 from kant/patch-1

Update Forum URL

ocs_git_update_error_log4

I managed to get this work, The git kept bringing the Master copy. So I got the direct Git link from github.com for the OCS 2.3.6 which is here and it worked

Git

It is now working :slight_smile: Thank you

I was too quick on this, Yes the site is open now, but when you click on View conference and want to login it gives you blank page and Logo file records errors, So the solution has not worked completely. I post the logo file, hopefully, you will have a solution for this, please.

[Mon Nov 26 08:00:08.401281 2018] [proxy_fcgi:error] [pid 7388] [client 103.253.148.23:38100] AH01071: Got error ‘PHP message: ocs2 has produced an error\n Message: WARNING: Declaration of Plugin::getSetting($conferenceId, $schedConfId, $name) should be compatible with PKPPlugin::getSetting($context, $name)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/classes/plugins/Plugin.inc.php\n At line: 20\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of Plugin::updateSetting($conferenceId, $schedConfId, $name, $value, $type = NULL) should be compatible with PKPPlugin::updateSetting($context, $name, $value, $type = NULL)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/classes/plugins/Plugin.inc.php\n At line: 20\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of CustomLocalePlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/customLocale/CustomLocalePlugin.inc.php\n At line: 20\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of TranslatorPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/translator/TranslatorPlugin.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of AcronPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/acron/AcronPlugin.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of PhpMyVisitesPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/phpMyVisites/PhpMyVisitesPlugin.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of AnnouncementFeedPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/announcementFeed/AnnouncementFeedPlugin.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of TinyMCEPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/tinymce/TinyMCEPlugin.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of GoogleAnalyticsPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/googleAnalytics/GoogleAnalyticsPlugin.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of IndexHandler::index($args) should be compatible with PKPHandler::index()\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/index/IndexHandler.inc.php\n At line: 20\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n Message: WARNING: Declaration of ConferenceHandler::index($args) should be compatible with PKPHandler::index()\n In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/conference/ConferenceHandler.inc.php\n At line: 0\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 7.0.30-0+deb9u1\n Apache Version: N/A\n DB Driver: mysqli\n DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: PHP Fatal error: Uncaught Error: Using $this when not in object context in /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/conference/ConferenceHandler.inc.php:34\nStack trace:\n#0 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/index/IndexHandler.inc.php(56): ConferenceHandler::index(Array)\n#1 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/lib/pkp/classes/core/PKPPageRouter.inc.php(177): IndexHandler->index(Array, Object(Request))\n#2 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/lib/pkp/classes/core/Dispatcher.inc.php(130): PKPPageRouter->route(Object(Request))\n#3 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/lib/pkp/classes/core/PKPApplication.inc.php(167): Dispatcher->dispatch(Object(Request))\n#4 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/index.php(65): PKPApplication->execute()\n#5 {main}\n thrown in /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.o…\n’, referer: Conference Portal

[Mon Nov 26 08:00:31.693861 2018] [proxy_fcgi:error] [pid 7392] [client 103.253.148.23:38102] AH01071: Got error 'PHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of Plugin::getSetting($conferenceId, $schedConfId, $name) should be compatible with PKPPlugin::getSetting($context, $name)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/classes/plugins/Plugin.inc.php\n  At line: 20\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of Plugin::updateSetting($conferenceId, $schedConfId, $name, $value, $type = NULL) should be compatible with PKPPlugin::updateSetting($context, $name, $value, $type = NULL)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/classes/plugins/Plugin.inc.php\n  At line: 20\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of CustomLocalePlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/customLocale/CustomLocalePlugin.inc.php\n  At line: 20\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of TranslatorPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/translator/TranslatorPlugin.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of AcronPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/acron/AcronPlugin.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of PhpMyVisitesPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/phpMyVisites/PhpMyVisitesPlugin.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of AnnouncementFeedPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/announcementFeed/AnnouncementFeedPlugin.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of TinyMCEPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/tinymce/TinyMCEPlugin.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of GoogleAnalyticsPlugin::manage($verb, $args, &$message) should be compatible with PKPPlugin::manage($verb, $args)\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/plugins/generic/googleAnalytics/GoogleAnalyticsPlugin.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of IndexHandler::index($args) should be compatible with PKPHandler::index()\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/index/IndexHandler.inc.php\n  At line: 20\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: ocs2 has produced an error\n  Message: WARNING: Declaration of ConferenceHandler::index($args) should be compatible with PKPHandler::index()\n  In file: /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/conference/ConferenceHandler.inc.php\n  At line: 0\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 7.0.30-0+deb9u1\n   Apache Version: N/A\n   DB Driver: mysqli\n   DB server version: 10.1.26-MariaDB-0+deb9u1\nPHP message: PHP Fatal error:  Uncaught Error: Using $this when not in object context in /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/conference/ConferenceHandler.inc.php:34\nStack trace:\n#0 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/pages/index/IndexHandler.inc.php(56): ConferenceHandler::index(Array)\n#1 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/lib/pkp/classes/core/PKPPageRouter.inc.php(177): IndexHandler->index(Array, Object(Request))\n#2 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/lib/pkp/classes/core/Dispatcher.inc.php(130): PKPPageRouter->route(Object(Request))\n#3 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/lib/pkp/classes/core/PKPApplication.inc.php(167): Dispatcher->dispatch(Object(Request))\n#4 /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.org/index.php(65): PKPApplication->execute()\n#5 {main}\n  thrown in /var/www/vhosts/koyauniversity.org/conferences.koyauniversity.o...\n', referer: http://conferences.koyauniversity.org/index.php/index/index/index/index