1

Please Please Help!

We have been running around in circles trying to resolve an issue with and old EE site, all of a sudden it just stopped working admin side, hitting memory limits (even at 1G) and hitting gateway issues.

We were on 2.5.3 and hoped the upgrade to 2.5.5 might help, we would love to get it upgraded to 2.8 + but it is just not an option due the the large amount of addons that we can't update because of all the issues!!

It's all points to Zoo Visitor, but the Zoo dev team have gone through everything and believe the issue lies within the EE core??

This old thread seems to be having the same issue:

http://ellislab.com/forums/viewthread/213888/#991232

Has anyone got any ideas thoughts on how this was fixed or could be fixed?

Has anyone experienced these issues or got ideas on how we might debug.

The issues are present on both local and live versions.

Any ideas would be greatly appreciated.

Sam

4
  • Does disabling Zoo Visitor resolve the issue? May 28, 2014 at 15:40
  • Disabling the zoo hook_session_end extension allows the page to be returned, although it never completes loading. The Zoo developer has fully debugged and can't find any issues, he feels it is an issue with the last extension loading. May 28, 2014 at 16:05
  • What do you mean allows the page to be returned but never completes loading? If you disable all extensions on your site, does the control panel behave properly? May 28, 2014 at 21:38
  • Yes, if we disable all extensions it works, we have tracked it down to an issue with the hook_sessions_end extension. Although its not the logic contained within this zoo extension as the developer has commented out all the code and the issue still occurs. He thinks it could be an issue with the last extension loading and or the sessions_end hook?? May 29, 2014 at 0:07

1 Answer 1

4

Wanted to share this here because I figured it would help others debug in the future.

The problem is with the Zoo Visitor extension- it's the session_start() function right at the beginning of the file. The server chokes on it- it also chokes on the example from the PHP docs in a completely standalone form. So my suggestion was to take it to the server admin and get that squared away on their end.

The debugging was quirky because if you took out all the code from the zoo visitor function called by the hook and just returned- it was still timing out. That made it seem the problem couldn't be with that extension.

So- I disabled all other functions using that hook:

update exp_extensions set enabled = 'n' where hook = 'sessions_end' and class != 'Zoo_visitor_ext'

Then- found the hook in libraries/Sessions.php and did some debugging:

    exit('done 1');

    // -------------------------------------------
    // 'sessions_end' hook.
    //  - Modify the user's session/member data.
    //  - Additional Session or Login methods (ex: log in to other system)
    //
        ee()->extensions->universal_call('sessions_end', $this);
        if (ee()->extensions->end_script === TRUE) return;
    //
    // -------------------------------------------

    exit('done 2');

Likewise, the function in zoo visitor had an exit. 'done 1' was fast. Comment that out- we timed out before the exit in the extension.

So- went to the Extensions library- and by the process of elimination, found that where it slows down is where it includes the extension file:

    // Include File
    if ( ! class_exists($class_name))
    {
        require $extension_path;
    }

The path was fine, so I pulled all of the code out of ext.zoo_visitor.php and just echoed out a 'hello'. That worked fine as far as timing out went. So then it was just going through the file and finding the issue- which was the session_start().

Make sense? It was a weird one.

We can finish this one off in support, Sam. But I figured it was worth the time to lay out how to track this one down since it was so slippery!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.