[eluser]viher[/eluser]
I tried what you said, but i have find where is the problem, but not the solution.
Like i said on first post, the problem is in the Hook.
Why?. Because when you enter in the website, the Hook is executed before controller is loaded, then if the user is logged (checks the user session data) the system redirects you to the main page, if not, the system redirects you to the login page.
But in production server, if you are not logged, the system prints the error that i wrote in the first message and he doesn't redirects you to the login page.
If you access to the login page directly, the system works fine:
Now when you are logged and you access to the main page, the hook redirects you correctly.
What can i do?
Thank you so much!