Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter.php: $EXT =& load_class('Hooks'); fails
#1

[eluser]kajala[/eluser]
I updated my Ubuntu based server and after the update one of the sites I have there does not work, and I was wondering if someone has an easy solution before I dig any further. Smile I'm sure I messed up something accidentally, but the funny thing is that I haven't touched anything in the /var/www/ folders and 4-5 other sites work ok.

I've traced the problem down to this line in codeigniter/CodeIgniter.php:

$EXT =& load_class('Hooks');

That call never returns and there is no error message either.

CodeIgniter version is 1.6.2.

Any ideas?
#2

[eluser]kajala[/eluser]
Found the problem: chmod log directory helped...

Still, would have been nice to get error message to screen about that. Now CI just died without any indication what went wrong. Maybe there is some reason for that but just thinking. Smile


Jani
#3

[eluser]xwero[/eluser]
and what went wrong?
#4

[eluser]kajala[/eluser]
[quote author="xwero" date="1236866166"]and what went wrong?[/quote]

Not sure, the load_class('Hooks') just died without any error anywhere. Started working after I did this:

chmod 777 system/logs

So I guess logs had wrong access mask for some reason.

But what I don't understand how that was changed and why I didn't get any error messages. I'd guess there is anyway some check that print error to screen if writing to log fails. I had E_ALL anyway on.
#5

[eluser]xwero[/eluser]
I guess you configured the log setting in the config.php to generate messages, not? I think because of the suppression of errors in the log class no output got returned to the hooks class.
#6

[eluser]kajala[/eluser]
In config.php I had following:

$config['log_threshold'] = 2;
$config['enable_hooks'] = FALSE;
#7

[eluser]xwero[/eluser]
Then the hooks class has nothing to do with the problem.
Code:
if ($CFG->item('enable_hooks') == FALSE)
{
   return;
}
This snippets comes from the hooks initialize method. Retuning nothing is build in behavior.

The problem is the log class that has too much error suppression.
#8

[eluser]kajala[/eluser]
I traced the dying a bit further: load_class('Hooks') loads some other classes ok, but finally the dying happens when loading (requiring) Log class for the second time.

Should I report this somewhere besides this thread?
#9

[eluser]xwero[/eluser]
You could check if there already is a bug report for this and if there isn't you should create one.

But i think your CI version will not be supported as eagerly as 1.7.x versions.
#10

[eluser]kajala[/eluser]
Ok. I'll update later to the new CI and check if similar thing happens again.




Theme © iAndrew 2016 - Forum software by © MyBB