We recently moved our hosting and the OJS stopped working all of the sudden. Initially it gave few files missing error. So, I tried to make it run by uploading all the files again. The initial error of files missing stopped. But, now I am getting following errors
[01-Mar-2020 16:32:54 UTC] PHP Notice: Constant PHP_REQUIRED_VERSION already defined in /home/jocr5991/public_html/classes/core/Application.inc.php on line 20
[01-Mar-2020 16:32:54 UTC] PHP Notice: Use of undefined constant ASSOC_TYPE_PUBLISHED_SUBMISSION - assumed ‘ASSOC_TYPE_PUBLISHED_SUBMISSION’ in /home/jocr5991/public_html/classes/core/Application.inc.php on line 24
[01-Mar-2020 16:32:54 UTC] PHP Fatal error: Cannot make static method PKPApplication::getName() non static in class Application in /home/jocr5991/public_html/classes/core/Application.inc.php on line 33
I am not sure how to get rid of these errors. Any help will be really appreciated.
Thanks!
Hi @Pratik_Ghela,
I suspect the missing files have the wrong contents or came from the wrong version of OJS. I’d suggest unpacking a fresh copy of the .tar.gz
package containing the same version of OJS that you were running before to make sure that all the files are correct. (This will revert any modifications or patches you’ve made to your code, of course.)
Regards,
Alec Smecher
Public Knowledge Project Team
How do I find the version number and what is the best place to download the .tar.gz package?
So, I think my version is 3.1.1-2 Right ?
Hi @Pratik_Ghela,
Yes, that’s the version according to the database. I’d suggest also checking dbscripts/xml/version.xml
to see if the source code agrees.
Regards,
Alec Smecher
Public Knowledge Project Team
Hey @asmecher,
Thanks for helping out. The site has started running. But, somehow the entire site is broken. You can check it at http://jocr.co.in/index.php/jocr/login
Is there a way to fix this?
Thanks!
These are the errors / warning I am getting
[01-Mar-2020 18:34:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[01-Mar-2020 18:34:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[01-Mar-2020 18:34:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[01-Mar-2020 18:34:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[01-Mar-2020 18:34:41 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[01-Mar-2020 18:34:41 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1003
[01-Mar-2020 18:34:41 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/jocr5991/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 0
[01-Mar-2020 18:34:41 UTC] PHP Notice: Undefined index: en_US in /home/jocr5991/public_html/lib/pkp/classes/context/Context.inc.php on line 273
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1003
[01-Mar-2020 18:34:42 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/jocr5991/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 335 of 1305 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 739 of 1316 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 739 of 1318 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 335 of 1330 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 771 of 1334 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 751 of 1316 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: Undefined index: en_US in /home/jocr5991/public_html/lib/pkp/classes/site/Site.inc.php on line 39
[01-Mar-2020 18:34:42 UTC] PHP Warning: Smarty error: unable to read resource: "frontend/components/skipLinks.tpl" in /home/jocr5991/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094
[01-Mar-2020 18:34:42 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/jocr5991/public_html/cache/t_compile/65bfc3e024c2e9104f46e23b73376a9455e3df0e^%%41^413^413796DB%%indexSite.tpl.php on line 25
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[01-Mar-2020 18:34:42 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/jocr5991/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1003
[01-Mar-2020 18:34:42 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/jocr5991/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 335 of 1305 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 739 of 1316 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 739 of 1318 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 335 of 1330 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 771 of 1334 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: unserialize(): Error at offset 751 of 1316 bytes in /home/jocr5991/public_html/lib/pkp/classes/db/DAO.inc.php on line 352
[01-Mar-2020 18:34:42 UTC] PHP Notice: Undefined index: en_US in /home/jocr5991/public_html/lib/pkp/classes/site/Site.inc.php on line 39
[01-Mar-2020 18:34:42 UTC] PHP Warning: Smarty error: unable to read resource: "frontend/components/skipLinks.tpl" in /home/jocr5991/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094
[01-Mar-2020 18:34:42 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/jocr5991/public_html/cache/t_compile/65bfc3e024c2e9104f46e23b73376a9455e3df0e^%%41^413^413796DB%%indexSite.tpl.php on line 25
You can safely suppress any “PHP Notice” and “PHP Deprecated” messages to clean up your logs a bit.
When clicking through you link currently, the site appears to be generally functioning. You have entered text of “jocr, orthopaedic case reports, journal of orthopaedic case reports, orthopedic case reports”, where you should have only given HTML (perhaps the Custom Headers Plugin?), and there is some cleanup you will want to do in your header and menu configuration, but I don’t see an immediate system errors.