We have a new web server, and I’m trying to move our OCS 2.3.6 installation to it. The web page does not come up, and a message in the Apache error log says,
“PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in /opt/www/conferences-test.uta.edu/lib/pkp/classes/core/String.inc.php on line 57”
This seems to be common to problems with PHP7.0 and software designed for older PHP versions. Is there any way to make OCS work on the new server? The server runs Ubuntu 16.04 and Apache 2.4. as well as PHP7.0.
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
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
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
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
It means you’ve checked out the OCS code from github in an incorrect/inconsistent way. The instructions @ctgrahamsend you above should do it correctly.
Regards,
Alec Smecher
Public Knowledge Project Team
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
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