OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problems with 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.

Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Tue Sep 22, 2009 1:53 pm

Hi.

My linux distro uploaded PHP to version 5.3. Unfortunately it was not a smooth update for the operating system, and it got worst for OJS.
(http://linguamatica.com)

When looking into the log I get lots of warnings of deprecated calls and strange get_class calls.

But it all ends with this:
Sep 22 21:46:04 camelo httpd: PHP Fatal error: Class 'HookRegistry' not found in /home/ambs/OJS/classes/db/DAO.inc.php on line 175

Found somewhere earlier in the log:
[Tue Sep 22 23:16:23 2009] [error] [client 93.108.171.131] PHP Warning: Parameter 2 to BlockPlugin::callback() expected to be a reference, value given in /home/ambs/OJS/classes/plugins/HookRegistry.inc.php on line 79

Some more news, updated OJS to 2.2.3, still not working properly :(

Any hint on what might be happening?
Thanks
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby jmacgreg » Wed Sep 23, 2009 1:08 pm

Hi ambs,

Can you tell us which actions are causing these errors to happen? I believe there are some oddities with OJS and PHP 5.3, but a lot of errors can be overlooked (deprecated calls etc. -- see viewtopic.php?f=8&t=4880). But if you are indeed running into show-stopper errors, please let us know exactly where and when they occur and we can investigate further.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Wed Sep 23, 2009 1:16 pm

Hello, jmacgreg.

As the journal deadline is coming (30 September) I uploaded a backup to the server (back to PHP 4.2 and OJS 2.2.2). After the deadline I'll come back for further details.

Sorry for opening this thread and halting it so soon. But I promise I'll be back ;)

Alberto
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Thu Sep 24, 2009 6:07 am

Hello

As I am having some other problems with OJS (see my two other posts) I upgraded to OJS 2.2.3
Still using PHP 5.2.10, when I access to the main page I get in syslog:

[Thu Sep 24 14:06:21 2009] [error] [client 93.108.171.131] PHP Fatal error: Class 'HookRegistry' not found in /home/ambs/OJS/classes/db/DAO.inc.php on line 175

At the moment that doesn't seem to have any impact in the main page loading. No idea if this might be responsible for any of the other problems...
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Thu Sep 24, 2009 7:47 am

Changed line 169 from file classes/db/DAO.inc.php so that the condition is never true:

if ($callHooks === true && checkPhpVersion('4.3.0') && false) {

And things got a little better. No warning, language change works, login works correctly. But I am still having blank pages on some configuration parts...
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby jmacgreg » Mon Sep 28, 2009 11:01 am

Hi Alberto,

Can you turn on the debug information at the very bottom of config.inc.php and let us know the results of a stack trace?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Mon Sep 28, 2009 12:32 pm

Hello, James.

I set:
show_stacktrace = On
and changed DAO.inc.php back to its original contents.

but, on the log I just get:
[28-Sep-2009 20:25:35] PHP Fatal error: Class 'HookRegistry' not found in /home/ambs/OJS/classes/db/DAO.inc.php on line 175

and nothing interesting in the website.

One easy way to notice things are not working properly is that in the bottom of the page '##journal.issn##: 1647-0818 ' appears, instead of what really should be shown: the journal footer, with Creative Commons logo, and that.

I am turning stacktrace back to Off for now.
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby rmurphy00 » Fri Oct 02, 2009 10:54 pm

Hey,

I too am having this problem after the host upgraded to the latest version of PHP. Webhosting is LAMP.

This is the error, and it is preventing login (no errors, just when I type in username and password it reloads the page like nothing happened). Additionally, it shows this error on all OJS pages by default:

Fatal error: Class 'HookRegistry' not found in /home/.../classes/db/DAO.inc.php on line 175

Is there perhaps a patch for this?

Thanks!
rmurphy00
 
Posts: 37
Joined: Thu Jul 17, 2008 8:49 am

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby jmacgreg » Mon Oct 05, 2009 11:00 am

Hi all,

There have been a few PHP 5.3 issues reported against OJS and OCS. I'm not sure if this one is related to Bug 4775, but I've attached a note to it. Please feel free to CC yourself to that report for further updates; if it's a separate bug, it'll likely be reported and handled separately.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Mon Oct 05, 2009 11:12 am

Hello

I am not running PHP 5.3 ATM.
Yeah, I know the first message I created was PHP 5.3 related :)
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby rmurphy00 » Mon Oct 05, 2009 8:59 pm

jmacgreg wrote:Hi all,

There have been a few PHP 5.3 issues reported against OJS and OCS. I'm not sure if this one is related to Bug 4775, but I've attached a note to it. Please feel free to CC yourself to that report for further updates; if it's a separate bug, it'll likely be reported and handled separately.

Cheers,
James


Hi James,

Do you know of some temporary fix to get rid of that error splattered on all the different pages?

Thanks!
rmurphy00
 
Posts: 37
Joined: Thu Jul 17, 2008 8:49 am

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby mcrider » Tue Oct 06, 2009 5:16 pm

Hi All,

Rmurphy, you can control what errors are being displayed by modifying the 'error_reporting' configuration in your.php ini file (see http://ca.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting).

Ambs, did you try clearing your OJS cache after switching PHP versions?

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby ambs » Wed Oct 07, 2009 4:13 am

mcrider wrote:Ambs, did you try clearing your OJS cache after switching PHP versions?


Yup. In fact I got back all the tree from backups.
ambs
 
Posts: 31
Joined: Tue Sep 22, 2009 1:49 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby Frenchy323 » Tue Nov 03, 2009 2:54 pm

I too am having this problem after my hosting site upgraded their PHP! There is a conference deadline nearing and I need to take action fast.


Fatal error: Class 'HookRegistry' not found in /home/rlogisco/public_html/ojs/hd.mcfns.com/classes/db/DAO.inc.php on line 175


pache version 2.2.13 (Unix)
PHP version 5.2.11

Any help is greatly appreciated.
Frenchy323
 
Posts: 1
Joined: Tue Nov 03, 2009 2:52 pm

Re: Problems with PHP 5.3 (Class 'HookRegistry' not found)

Postby biomat » Wed Nov 04, 2009 5:30 pm

Great temporary fix - thank you. I'm having the same problem after upgrading to PHP 5.2.11 (note I originally stated that it was 5.3 but after checking the version I found that that was not correct). The Class HookRegistry is not found even though it is where it supposed to be, nobody can log on. This quick fix enables the ojs installation to function, even though it is a pain in the neck, because every time I refresh the screen I get blank 404 error and I have to refresh it again to get the right screen. After logging on or off I get 404 blank screen and refreshing doesn't help - I have to go back a screen and then refresh it. It all acts very unprofessionally and is embarrassing. I sure hope someone will find a real solution for this bug soon (the recent 47.. bug doesn't do any good for this problem).

ambs wrote:Changed line 169 from file classes/db/DAO.inc.php so that the condition is never true:

if ($callHooks === true && checkPhpVersion('4.3.0') && false) {

And things got a little better. No warning, language change works, login works correctly. But I am still having blank pages on some configuration parts...
Last edited by biomat on Fri Nov 06, 2009 6:50 am, edited 1 time in total.
biomat
 
Posts: 23
Joined: Wed Jul 23, 2008 11:07 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Yahoo [Bot] and 2 guests