Error from 2.4.8 to 3.0.2

Dear team,

I was trying to upgrade the ojs, and I have this error about unserialize(). I don’t know how to do. Any suggestions? Thank you very much. Best regards.

[26-Feb-2017 01:07:13 UTC] PHP Strict Standards: Declaration of SubmissionSubjectDAO::build() should be compatible with ControlledVocabDAO::build($symbolic, $assocType = 0, $assocId = 0) in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/submission/SubmissionSubjectDAO.inc.php on line 21
[26-Feb-2017 01:07:13 UTC] PHP Strict Standards: Declaration of SubmissionDisciplineDAO::build() should be compatible with ControlledVocabDAO::build($symbolic, $assocType = 0, $assocId = 0) in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/submission/SubmissionDisciplineDAO.inc.php on line 0
[26-Feb-2017 01:07:13 UTC] PHP Strict Standards: Declaration of SubmissionAgencyDAO::build() should be compatible with ControlledVocabDAO::build($symbolic, $assocType = 0, $assocId = 0) in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/submission/SubmissionAgencyDAO.inc.php on line 0
[26-Feb-2017 01:07:13 UTC] PHP Strict Standards: Declaration of SubmissionLanguageDAO::build() should be compatible with ControlledVocabDAO::build($symbolic, $assocType = 0, $assocId = 0) in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/submission/SubmissionLanguageDAO.inc.php on line 0
[26-Feb-2017 01:07:13 UTC] PHP Notice: unserialize(): Error at offset 1123 of 1442 bytes in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[26-Feb-2017 01:07:13 UTC] PHP Notice: unserialize(): Error at offset 149 of 219 bytes in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[26-Feb-2017 01:07:14 UTC] PHP Notice: unserialize(): Error at offset 1123 of 1442 bytes in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[26-Feb-2017 01:07:14 UTC] PHP Notice: unserialize(): Error at offset 149 of 219 bytes in /home/wwwipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[26-Feb-2017 01:07:14 UTC] PHP Strict Standards: Declaration of

You should start by disabling those strict standard errors.

1 Like

Thanks ajnyga,

I have disabled the strict standards, I have installed again and it fails again. I attach the message log. Any suggestion?

thank you very much.

[28-Feb-2017 01:00:54 UTC] PHP Deprecated: Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/install/form/InstallForm.inc.php on line 146
[28-Feb-2017 01:00:54 UTC] PHP Deprecated: Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/install/form/InstallForm.inc.php on line 148
[28-Feb-2017 01:00:54 UTC] PHP Deprecated: Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/install/form/InstallForm.inc.php on line 150
[28-Feb-2017 01:00:54 UTC] PHP Deprecated: Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/install/form/MaintenanceForm.inc.php on line 37
[28-Feb-2017 01:00:54 UTC] PHP Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/form/Form.inc.php on line 351
[28-Feb-2017 01:00:54 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/core/PKPRequest.inc.php on line 582
[28-Feb-2017 01:00:58 UTC] PHP Deprecated: Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/install/form/MaintenanceForm.inc.php on line 37
[28-Feb-2017 01:00:58 UTC] PHP Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/form/Form.inc.php on line 351
[28-Feb-2017 01:00:58 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/core/PKPRequest.inc.php on line 582
[28-Feb-2017 01:01:01 UTC] PHP Deprecated: Non-static method PKPRequest::isPost() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/form/validation/FormValidatorPost.inc.php on line 38
[28-Feb-2017 01:01:01 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/core/PKPRequest.inc.php on line 396
[28-Feb-2017 01:01:05 UTC] PHP Deprecated: Non-static method Version::fromString() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/install/Installer.inc.php on line 243

What is your error_reporting setting in php.ini? Seems that you have deprecated errors turned on?

Hi ajnyga,

The error_reporting is set: 22527 (local value) // 30711 (master value)

thank you very much

So are you using htaccess to change the setting?

Hi ajnyga,

No, I modify direclty php.ini. I think the value is “30711”, but I don’t know if it is necessary to modify local value too.

Thank yo uvery much

Yes it should be 30711 but I am not sure where the local value is coming from.

What are your error settings in config.inc.php? And are you sure you do not have any error settings in htaccess?

Hi ajnya,

I don’t have htaccess and don’t have error settings parameters in config.inc.php. The “Debug Settings” in config.inc.php, are all off, I don’t know if you are talking about it. Is it necessary to put them to on?

thank you very much

Did you open php.ini file and check what the error_reporting is there?

This is what I have: error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

Hi ajnyga,

I get modified the local value, then now the “error_reporting” is set to: 30711 (local value) // 30711 (master value). I think it is correct. With this configuration I have tried to upgrade the OJS3 and I have similar messages:

[01-Mar-2017 23:18:58 Europe/Madrid] PHP Deprecated: Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/install/form/InstallForm.inc.php on line 146
[01-Mar-2017 23:18:58 Europe/Madrid] PHP Deprecated: Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/install/form/InstallForm.inc.php on line 148
[01-Mar-2017 23:18:58 Europe/Madrid] PHP Deprecated: Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/install/form/InstallForm.inc.php on line 150
[01-Mar-2017 23:18:58 Europe/Madrid] PHP Deprecated: Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/install/form/MaintenanceForm.inc.php on line 37
[01-Mar-2017 23:18:58 Europe/Madrid] PHP Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/form/Form.inc.php on line 351
[01-Mar-2017 23:18:58 Europe/Madrid] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/core/PKPRequest.inc.php on line 582
[01-Mar-2017 23:19:01 Europe/Madrid] PHP Deprecated: Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/install/form/MaintenanceForm.inc.php on line 37
[01-Mar-2017 23:19:01 Europe/Madrid] PHP Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/form/Form.inc.php on line 351
[01-Mar-2017 23:19:01 Europe/Madrid] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/core/PKPRequest.inc.php on line 582
[01-Mar-2017 23:19:03 Europe/Madrid] PHP Deprecated: Non-static method PKPRequest::isPost() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/form/validation/FormValidatorPost.inc.php on line 38
[01-Mar-2017 23:19:03 Europe/Madrid] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/core/PKPRequest.inc.php on line 396
[01-Mar-2017 23:19:03 Europe/Madrid] PHP Deprecated: Non-static method Version::fromString() should not be called statically, assuming $this from incompatible context in /home/wwwhipat/public_html/_ojs3/lib/pkp/classes/install/Installer.inc.php on line 243

thank you very much!

Hi,

Maybe the php version is affecting this somehow, because I do not see any deprecated errors with the setting mentioned above.

Maybe this would work then?
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

Hi @ipa,

In addition to the suggestions above, make sure you haven’t turned on the deprecation_warnings settings in config.inc.php.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher and @ajnyga ajnyga,

I put the error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT, and I checked deprecation_warning =off in the config.inc.php.

I re-upgrade the version 2.4.8.1 in order to check if there was any error in the last upgrade. Then I update the to 3.0.2 and I have the folowing errors:

[03-Mar-2017 09:59:54 UTC] PHP Warning: mb_internal_encoding(): Unknown encoding “” in /home/ipa/public_html/_ojs3/lib/pkp/classes/core/String.inc.php on line 71
[03-Mar-2017 10:00:01 UTC] PHP Warning: mb_internal_encoding(): Unknown encoding “” in /home/ipa/public_html/_ojs3/lib/pkp/classes/core/String.inc.php on line 71
[03-Mar-2017 10:00:03 UTC] ojs2 has produced an error
Message: WARNING: fopen(/locales.xml): failed to open stream: No such file or directory
In file: /home/ipa/public_html/_ojs3/lib/pkp/classes/file/FileWrapper.inc.php
At line: 71
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.19
Apache Version: N/A
DB Driver:
[03-Mar-2017 10:00:03 UTC] ojs2 has produced an error
Message: WARNING: xml_parser_set_option(): Unsupported target encoding “”
In file: /home/ipa/public_html/_ojs3/lib/pkp/classes/xml/XMLParser.inc.php
At line: 273
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.19
Apache Version: N/A
DB Driver:
[03-Mar-2017 11:32:16 UTC] PHP Warning: require_once(/home/ipa/public_html/_ojs3/classes/tasks/ReviewReminder.inc.php): failed to open stream: No existe el fichero o el directorio in /home/ipa/public_html/_ojs3/lib/pkp/includes/functions.inc.php on line 25
[03-Mar-2017 11:32:16 UTC] PHP Fatal error: require_once(): Failed opening required ‘/home/ipa/public_html/_ojs3/classes/tasks/ReviewReminder.inc.php’ (include_path=’.:/home/ipa/public_html/_ojs3/classes:/home/ipa/public_html/_ojs3/pages:/home/ipa/public_html/_ojs3/lib/pkp:/home/ipa/public_html/_ojs3/lib/pkp/classes:/home/ipa/public_html/_ojs3/lib/pkp/pages:/home/ipa/public_html/_ojs3/lib/pkp/lib/adodb:/home/ipa/public_html/_ojs3/lib/pkp/lib/phputf8:/home/ipa/public_html/_ojs3/lib/pkp/lib/pqp/classes:/home/ipa/public_html/_ojs3/lib/pkp/lib/smarty:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php’) in /home/ipa/public_html/_ojs3/lib/pkp/includes/functions.inc.php on line 25

thank you very, I really apreciate your help.

can you describe how you did the upgrade? It seems that some files from OJS3 are missing?

Did you use git or download the package from the PKP site? Did you follow the instructions here: https://github.com/pkp/ojs/blob/master/docs/UPGRADE

Dear @ajnyga,

I have followed the instructions of the document. I download the version 3.0.2 of pkp website and I extract it and copy the public folder and data folder… modify the config…

It check the missing file, and it is not in the download zip also…

I forgot to comment that after the error, the system redirects to “…/index/install/installUpgrade” and when I put the installed = on I can see the journal but without graphics menus and I can not see pdfs.

I don’t know what I can check more.

thank you very much.

In OJS2.4.8 ReviewReminder.inc.php used to be in classes/tasks/ReviewReminder.inc.php. However, in OJS3 that was moved to lib/pkp/classes/tasks/ReviewReminder.inc.php.

Are you sure that there are no old files from the OJS2 installation?

Otherwise I am not sure what is happening here, @asmecher probably knows?

Hi all,

It sounds to me like the upgrade process did not fully complete. I’d suggest restoring your DB and files area from your OJS2 backup, then re-running the upgrade process. Ensure that you get a confirmation at the end that the upgrade was successful. If possible, I’d suggest using the command-line upgrade tool (php tools/upgrade.php upgrade) rather than the web-based version, as it provides more information.

If your upgrade does not confirm successful, then check your PHP error log for details.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear team,

I tried again with the comand-line and I have this errors. I can not access tot comand-line, then I explain to the shared hosting and the technicals do it for me.

There are a lot of errors strict “should not be called statically, assuming $this from incompatible context in” and the other are:

[06-Mar-2017 14:39:08 UTC] PHP Strict Standards: Non-static method ScheduledTaskHelper::_isInRange() should not be called statically, assuming $this from incompatible context in /home/ipa/public_html/_ojs3/lib/pkp/classes/scheduledTask/ScheduledTaskHelper.inc.php on line 114
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 1123 of 1442 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 149 of 219 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 3219 of 3435 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 3884 of 4099 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 1234 of 1500 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 50 of 280 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 72 of 3768 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 167 of 1137 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 50 of 355 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 50 of 530 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 375 of 1541 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 1065 of 1404 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Notice: unserialize(): Error at offset 156 of 538 bytes in /home/ipa/public_html/_ojs3/lib/pkp/classes/db/DAO.inc.php on line 347
[06-Mar-2017 14:39:08 UTC] PHP Strict Standards: Declaration of DevelopedByBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/ipa/public_html/_ojs3/plugins/blocks/developedBy/DevelopedByBlockPlugin.inc.php on line 20
[06-Mar-2017 14:39:08 UTC] PHP Strict Standards: Declaration of DevelopedByBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/ipa/public_html/_ojs3/plugins/blocks/developedBy/DevelopedByBlockPlugin.inc.php on line 20
[06-Mar-2017 14:39:08 UTC] PHP Strict Standards: Declaration of DevelopedByBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/ipa/public_html/_ojs3/plugins/blocks/developedBy/DevelopedByBlockPlugin.inc.php on line 20

Hi @ipa,

What you have there is a mix of strict mode standards warnings, and encoding warnings. The strict mode standards warnings are cosmetic, and can be suppressed by editing your PHP configuration. Don’t worry about these, but make sure you’re directing error messages to your log files rather than the browser. (This is recommended for production servers anyway.)

For the encoding problems – these are the ones that reference the unserialize function – I suspect you’ve inadvertently changed your database encoding or your character set configuration in config.inc.php.

Neither of these should prevent an upgrade, however, so I wonder if there’s another relevant error message buried amongst the others. Working to clear out both sets of errors would help leave only the relevant ones present.

Regards,
Alec Smecher
Public Knowledge Project Team