OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



PHP 5.3 - Class 'HookRegistry' not found

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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

PHP 5.3 - Class 'HookRegistry' not found

Postby vlilloh » Thu Jan 13, 2011 8:48 am

Hi,

In a few days it is going to change the php version on my server from 5.2 to 5.3.2. The first tests of our OJS with PHP 5.3 there is a problem. Users can not login.

And it throws the following fatal error:

[Wed Jan 12 10:06:54 2011] [error] [client 66.249.72.212] PHP Fatal error: Class 'HookRegistry' not found in /home/sp-dgroup/a1/www.um.es/vh/revistas.um.es/prod/lib/pkp/classes/db/DAO.inc.php on line 192

The php version is:
PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.

I work with the latest version of OJS, and with all recommended patches.

This may be related to http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=4999? APC-related?

Any suggestions?
Thanks.
vlilloh
 
Posts: 281
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby vlilloh » Sat Jan 15, 2011 9:15 am

Confirmed. Is APC-related too, disabling APC resolved the problem.

Although I have no cache accelerator .. and my OJS is heavily loaded.

Finally, it seems to be a APC issue, not PHP bug.

Cheers.
vlilloh
 
Posts: 281
Joined: Thu Feb 07, 2008 3:35 am
Location: Murcia, Spain

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby mariagwyn » Thu Feb 10, 2011 2:45 pm

If it is not an option to disable APC, what do we do? Or, is it not possible to run OJS on such a system?
mariagwyn
 
Posts: 1
Joined: Thu Feb 10, 2011 2:42 pm

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby jorgecardoso » Wed Apr 25, 2012 3:07 am

mariagwyn wrote:If it is not an option to disable APC, what do we do? Or, is it not possible to run OJS on such a system?


I'm interested in knowing the answer to this also. Anyone knows a solution?
jorgecardoso
 
Posts: 6
Joined: Sun Dec 25, 2011 5:53 pm

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby asmecher » Wed Apr 25, 2012 7:53 am

Hello all,

Newer versions of APC are reported to work fine. The flawed version of APC causes PHP to behave unpredictably, and I doubt it would be easy to work around the issue from within PHP. Consider that a "probably not", unfortunately.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8345
Joined: Wed Aug 10, 2005 12:56 pm

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby mgregson » Tue Sep 18, 2012 11:06 pm

I've been investigating using APC 3.1.9 and PHP 5.3.3 with our OJS installations and came across this same problem. In my case it is definitely resolved by disabling APC.

In this bug report, https://bugs.php.net/bug.php?id=58739, it describes a workaround: 'Put session_write_close() in your script when you are done with the session.' I followed a subsequent suggestion and inserted 'register_shutdown_function("session_write_close");' at the top of webroot/index.php. This resolved the login issue but I didn't have time to test any further. I don't completely understand the bug or the workaround so I can't predict any potential problems with the workaround.

Does anyone know any more about this?
mgregson
 
Posts: 14
Joined: Wed Jan 19, 2011 8:22 pm

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby asmecher » Wed Sep 19, 2012 7:19 am

Hi mgregson,

I don't foresee any problems with that -- but please report back. (This is a pretty old APC bug, so I'm hesitant to put much time into working around it.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8345
Joined: Wed Aug 10, 2005 12:56 pm

Re: PHP 5.3 - Class 'HookRegistry' not found

Postby mgregson » Wed Sep 19, 2012 10:33 pm

Thanks, Alec. That's a little reassurance that the issue can be 'resolved' this way. I'll do some testing and see what I find.

Cheers
Mark
mgregson
 
Posts: 14
Joined: Wed Jan 19, 2011 8:22 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest