Fron 2.4.8 to 2.4.8-5

Hi all!

I´m trying to upgrade OJS 2.4.8 to 2.4.8-5 because of PHP7 Support.
.I downloaded all the 2.4.8-5 software, copied file_updates directory, back up the data base, configure the new config.inc file but when I type the URL ojs.mysite.es/install.php it appear a page full od php warnings but nothing similar like the OJS install page.
Nothing interpreted appears.

I know we sholud go to OJS 3 and I did an update months ago but our users said it was very different than the current versión and they prefer to stay in 2.4.8.
As we have to migrate to PHP7 I thought that this was the solution (2.4.8-5) but I must be doing something wrong.
I don´t know if I have to apply patches (-1, -2, -3, -4) before updating to -5 or it must work the way I’ve done.
Can anybody help me? Have you updated to this version -5 to be able to run it with PHP7?
Thanks in advance!
Cristina

Hello again,

After exec " php tools/upgrade.php check" in the command line, the output indicates me that the database version is older than the software, so I exec php tools/upgrade.php upgrade and it seems that I managed to upgrade the system to 2.4.8.5.
Now I have some warnings and I´m trying not to been shown into the web system.
Something like:

Deprecated : Non-static method PKPApplication::defineExposedConstant() should not be called statically in /web/sp/ojs-2.4.8-5/lib/pkp/classes/core/PKPApplication.inc.php on line 545

Deprecated : Non-static method PKPApplication::getExposedConstants() should not be called statically in /web/sp/ojs-2.4.8-5/lib/pkp/classes/core/PKPApplication.inc.php

I´ll inform if I solve that inconvenience.
Regards!
C.

Hi @lacris,

Those warnings are cosmetic and shouldn’t cause you any problems – just make sure they are directed to the log file rather than the web browser.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher!

I don´t know how to do that. Coukd you please tell me how to redirect that to log web server?

In my config.inc.file I have
deprecation_warnings = Off
But it seems it ignores me.

Thank you!!

Hi @lacris,

This will be your PHP configuration file, rather than your OJS configuration. See: Turning off Deprecation warnings in PHP.ini file WAMP - Stack Overflow

If possible, make sure to restart your web server process; that’s required on some servers in order to have php.ini changes take effect.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello again,

I think that my php.ini is right but I´m going to check it again more carefully.
Thanks again.
C.

Hi again,

I´m lost.

I’ve tried putting different options but those two lines keep coming out.
;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE
;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = E_ALL & ~E_DEPRECATED → this is the old server option (ojs 2.4.8 with php 5.3)
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR

any idea?
Thanks a lot!

I would expect that line to work.

Double check that the PHP interpreter in use for your webserver is connected to the php.ini which you are editing, and that the error_reporting setting is not being overriden by another ini file or PHP directive. Your system administrator or hosting provider would be able to assist in verifying that.

If you are comfortable adding a new PHP file to your system, a quick way to test this would be to add one with just the content of:

<?php phpinfo(); ?>

Visiting this php file in your webbrowser will share a large amount of (potentially sensitive) information about your PHP install. One line will describe what the error_reporting variable defaults to, and what the effective value is after all processing.

The phpinfo() confirms that the file that is being used is /etc/php.ini and that is where I am doing these tests with the different options to show the errors (error_reporting).
I will try the first option again [ error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE], reload apache and load ojs to see if with a new day, it works … (ha, ha).

Thanks!

imagen

Hello again,

I have done what I said above but nothing has changed.

The same two lines appear on all OJS pages, from the cover page to the detail of an article (*)

[
Deprecated : Non-static method PKPApplication::defineExposedConstant() should not be called statically in /web/sp/ojs-2.4.8-5/lib/pkp/classes/core/PKPApplication.inc.php on line 545

Deprecated : Non-static method PKPApplication::getExposedConstants() should not be called statically in /web/sp/ojs-2.4.8-5/lib/pkp/classes/core/PKPApplication.inc.php on line 513
]

I don’t know PHP but could I try to modify those two lines to avoid those messages? It is easy?
Cristina

(*) Before modifying php.ini, many warning lines appear. Now I only have two, so something has been done thanks to modifying the php.ini error_reporting but I can’t remove all warnings. It’s very strange!

What is the Local Value and the Master Value for “error_reporting” in your phpinfo() output?

Hi ctgraham,

It has the same value:
imagen

That is the value for E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE, so your configuration is working.

I bet this is a E_USER_DEPRECATED level message. Try:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED

Good morning ctgraham,

I tried the new log parameter but everything remains the same.
If you can think of anything else I can try, let me know.

Thank you!
Cristina

Hello again,

I have been adding new parameters but I still see the same two warning lines
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_USER_DEPREC
ATED & ~E_WARNING & ~E_USER_WARNING & ~E_CORE_WARNING & ~E_COMPILE_WARNING
I´m lost.

Hello!,

If I set display_errors = Off it’s solved.

Is it very wrong to leave it like this in the production environment?

It is recommended to leave display_errors “Off” for production.

Good morning!

Ok then. I close the subject as solved!

Thank you so much!

Cristina

Dear Cristina,
check your webserver logs for size - I also did the upgrade to 2.4.8.5 to run OJS in PHP 7 and in my case these php warnings were piling up in the server logs and the logs can become huge. See these posts for the fix: Ojs 2.4.8-4 is compatible with php 7.3? - #12 by AlesKladnik, PHP 7 warnings filling up error log after upgrade to 2.4.8.4

If you downloaded the code from git using ojs-stable-2_4_8 branch this should be fixed, but the code in the OJS download page is missing this fix. This is the fixed file: pkp-lib/PKPApplication.inc.php at ojs-stable-2_4_8 · pkp/pkp-lib · GitHub

@asmecher Alec, is it possible to update the Download OJS 2.4.8-5 link with the lastest changes in the ojs-stable-2_4_8 branch on git?

Regards, Ales

Hi @AlesKladnik,

I’m not sure yet whether we’ll release another OJS 2.x package – it does take time and we’re much more focused on OJS 3.x; I’d encourage you to consider upgrading rather than maintaining OJS 2.x.

Regards,
Alec Smecher
Public Knowledge Project Team