-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger not shown on some servers with recent session changes #185
Comments
Try following the hint in #154 (comment) |
Thanks for the tip, but either I am not getting it, or it's still not working. I tried manually doing a: and also tried adding: Any chance of some more details on how to actually implement? Thanks! |
When using nginx you must use |
Not running nginx - just good ol' apache. I still have no idea how to get the debug bar to display on this one server. |
I have started investigating the problem and I think there are a few things going on.
which actually contains the complete html of the loaded page.
|
When you open this url and dump $_GET, do you see parameter _tracy_bar? |
$_GET is empty. $_SESSION['_tracy'] is:
Here are the bar resources that are loaded: |
Sometimes the ?_tracy_bar=content resource is not loaded |
$_GET is empty on url |
The url has an empty Response when loaded directly with ?_tracy_bar=content.bdbdc38d34. If I remove the _ prefix it loads and the value is displayed in the value of the dumped $_GET |
I guess the key thing is that the $_GET['tracy_bar'] is not available inside the dispatchContent() method. |
Can you try investigate why your server removes this parameter? |
I just figured out a hack to get the debug bar to display. These are the changes I made. Basically it is all about getting the $contentId variable that is valid in the render() method into the $session variable in the dispatchContent() method. I am not suggesting this is the right way to fix it all - it's definitely not, but I think it shows that the only problem is that Bar.php
|
It seems like there is no call to |
Ok, so I see that the call to
I haven't traced back further than that yet, but I am guessing it will likely be obvious to you now? |
Commenting out these line like this also works without any of the changes above because it gets the valid $contentId to loader.phtml:
Hopefully this is helpful and I am not too far removed from the source of the problem. |
Apologies - that last post wasn't really true - the $contentId is obviously not set at all, but not setting is what allows the debug bar to show. |
Even if I |
Sorry for the very fragmented feedback on this - trying to finish up some other things and pack to go on vacation tomorrow. So it looks like the GET['_tracy_bar'] is there, but it only gets populated the second time |
@adrianbj Could you try to dump |
Ok, here are the results on this log statement placed just before the
Working Local Dev
Not Working Production Server
So I don't think there is any difference and I don't think the issue is related to |
I would like to release stable next week. Did you found reason why it does not work? What about last dev version? |
In the latest dev version the debug bar works fine for normal loading if I make just this one change in loader.phtml
to:
However it still doesn't show the AJAX version of the bar. This Line 64 in 1503008
$this->dispatched is returning TRUE
|
Just going to keep adding more things as I notice them. Obviously add the
links from being created. So, this approach allows that:
This means that Debug is initiated regardless of $contentId. AJAX calls still don't work though. |
Ok, I am very confused. I have access to my local dev environment, a dedicated self managed server (where I host most of my sites), and two separate shared hosts. The latest dev version works on my local dev environment and the self managed server, but not on the shared hosts. On the shared hosts I have changed PHP versions, session settings and some other stuff with no luck. Have you tested on a basic shared host? |
Actually, it might come back to this: session.save_handler: files vs session.save_handler: user OR: Server API: Apache 2.0 Handler vs Server API: CGI/FastCGI because my dedicated production server matches my dev environment for both of these settings. I am not very experienced with shared hosting - I have always been lucky to manage my own servers, but these two settings are the same on the problematic shared hosts. Any thoughts on this? |
It's quite possible that the custom session save handler is not implemented properly. |
Sorry @dg - still no luck with |
Can you create for me account on this host? |
Email with access details sent. |
@adrianbj So I know where the problem is! Session was closed earlier than bar was rendered. Probably there is I tried to re-open session in Bar.php, but it throws PDOException with message It should be fixed now, but you need to discover why is session closed in order to see AJAX requests. And maybe there is really problem with session size. |
Thanks @dg - I really appreciate you taking a look - your discovery helped me figure out the difference between the servers that work and those that don't. Turns out that on the ones that don't work I was using a module that stores session info in the database, rather than the filesystem. If this is disabled, then it immediately works as expected with AJAX requests. The data too long error can be fixed by changing the field from text to longtext, but then I end up with:
Changing my max_allowed_packet setting prevents the error, but AJAX requests are still not working. I guess that is still related to the session being closed. Hopefully this is something that can be fixed on my end, but I'll let you know if there is anything I think could be changed in Tracy to help, short of doing things the old way (ie before 5c46e98). |
I just wanted to add one final followup that might be useful for others that come across this problem. I now have Tracy reporting AJAX requests even with the database session handler. The key was actually to call |
Since 5c46e98 (all the session changes) I no longer see the debugger bar on one of my servers. I haven't tested widely yet to narrow it down, but here are a few key differences between one that works and one that doesn't.
Works:
PHP 5.6.6
Server API: Apache 2.0 Handler
session.save_handler: files
Doesn't Work:
PHP 5.5.35
Server API: CGI/FastCGI
session.save_handler: user
Let me know if I can provide ant further info.
The text was updated successfully, but these errors were encountered: