OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problems with PHP 5.4.18

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Problems with PHP 5.4.18

Postby lorenzoat » Mon Aug 26, 2013 7:38 pm

Hi,

I am running an OJS 2.3.1 installation at www.rlmm.org

My server provider just upgrade the PHP system from 5.2 to 5.4.18. From that moment, I can not access the "Journal Manager" page, I keep getting a blank page.

Below is the information I am getting from my "error_log" file:


[26-Aug-2013 21:30:30 America/Chicago] ojs2 has produced an error
Message: CAUGHT EXCEPTION: Assigning the return value of new by reference is deprecated
In file: /public_html/rlmm/ojs/plugins/generic/piwik/PiwikPlugin.inc.php
At line: 212
Stacktrace:
File: /public_html/rlmm/ojs/plugins/generic/piwik/index.php line 21
Function: PKPApplication->errorHandler(8192, "Assigning the return value of new by reference is deprecated", "/public_html/rlmm/ojs/plugins/generic/piwik/PiwikP...", 212, Array(8))
File: /public_html/rlmm/ojs/plugins/generic/piwik/index.php line 21
Function: require_once()
File: /public_html/rlmm/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php line 100
Function: include("/public_html/rlmm/ojs/plugins/generic/piwik/index....")
File: /public_html/rlmm/ojs/lib/pkp/classes/core/Dispatcher.inc.php line 128
Function: PluginRegistry->loadCategory("generic")
File: /public_html/rlmm/ojs/lib/pkp/classes/core/PKPApplication.inc.php line 155
Function: Dispatcher->dispatch(Object(Request))
File: /public_html/rlmm/ojs/index.php line 66
Function: PKPApplication->execute()
Server info:
OS: Linux
PHP Version: 5.4.18
Apache Version: N/A
DB Driver: mysql
DB server version: 5.1.70-cll
[26-Aug-2013 21:30:30 America/Chicago] PHP Fatal error: Call to undefined function session_is_registered() in /public_html/rlmm/ojs/lib/pkp/classes/session/Session.inc.php on line 64

is there any way to solve this?.

Best regards,

Tom
lorenzoat
 
Posts: 30
Joined: Sat Apr 10, 2010 9:41 am

Re: Problems with PHP 5.4.18

Postby JasonNugent » Tue Aug 27, 2013 7:56 am

Hi Tom,

There have been lots of changes to OJS since 2.3.1 -- have you considered upgrading to 2.3.8 or the newer 2.4 stable release? In your case, the problem is that the session_is_registered PHP function no longer exists in newer versions of PHP. Your solution is to either upgrade OJS or go back to the older version of PHP.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: Problems with PHP 5.4.18

Postby lorenzoat » Tue Aug 27, 2013 8:43 am

Hi Jason,

Thanks a lot for the quick answer.

I would like to upgrade to a newer version, but I highly customized my OJS installation ( www.rlmm) modifying at lot of those .tpl files.

My concern here is about keep those changes during the upgrading process?. Could this be possible?.

Regards,

Tom
lorenzoat
 
Posts: 30
Joined: Sat Apr 10, 2010 9:41 am

Re: Problems with PHP 5.4.18

Postby JasonNugent » Tue Aug 27, 2013 9:12 am

Hi Tom,

There have been many changes to OJS, templates included, between 2.3.1 and 2.3.8. My suggestion would be to compare your own installation against a stock install of 2.3.1, and make a diff of those two directories. Then you'd have your changes captured. Some of those changes may go against 2.3.8 cleanly, but I suspect that you'd have a bit of manual merging and tweaking to do. But at least you'd be able to keep track of your progress. In the interim, dropping down a PHP version will get your site working again.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: Problems with PHP 5.4.18

Postby JasonNugent » Tue Aug 27, 2013 9:16 am

Also, an even quicker answer might be to apply this patch:

http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7544

which will remove the session_ functions from OJS. There may still be other PHP 5.4 incompatibilities, though.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: Problems with PHP 5.4.18

Postby lorenzoat » Tue Aug 27, 2013 9:59 am

Thanks Jason,

I applied the patch, and now those errors are gone.

Some questions:

1.- How can I create a "Diff" of two folder?.

2.- Should I wait until a stable version of OJS 3.X is released?. So, I could upgrade directly to this "new" version.

3.- There is a list of other PHP 5.4 incompatibilities I should be aware of?.

Regards,
lorenzoat
 
Posts: 30
Joined: Sat Apr 10, 2010 9:41 am

Re: Problems with PHP 5.4.18

Postby JasonNugent » Tue Aug 27, 2013 10:36 am

Hi Tom,

The 'diff' command can recursively compare directories with the -r flag.

OJS 3.0 stable won't be out for a while. We're targeting March 2014 for that, but that may move around a bit.

I'm not aware of other specific PHP incompatibilities, although OJS 2.3.5 included a substantial rewrite of the localization code to prevent a name clash with a class that ships with new versions of PHP. You might run into that one, and there is no patch that I am aware of, other than to upgrade.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: Problems with PHP 5.4.18

Postby lorenzoat » Tue Aug 27, 2013 10:57 am

Thanks a lot Jason,

If I don't encounter any big issue with my current installation, I will wait until the 3.0 release next year.

Thanks for your support.

Regards,
lorenzoat
 
Posts: 30
Joined: Sat Apr 10, 2010 9:41 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 2 guests

cron