Robin S Posted November 1, 2018 Posted November 1, 2018 13 minutes ago, adrian said: There is one outstanding one on his local Windows dev setup that I can't reproduce at all and he also isn't seeing on a live server. He is getting session_start / headers already sent error. After testing on a few more local sites I can't reproduce the error, so must be something specific to that one site and nothing to bother with. But one new issue I noticed is that it seems Adminer expects its root url to always include a query string. So in the Tracy implementation it can form invalid URLs that lead to a 404. For example, the link back to the database view: 1
Robin S Posted November 1, 2018 Posted November 1, 2018 5 minutes ago, adrian said: Quick note to let you know that it's also possible to run Adminer directly via: /processwire/setup/adminer/ which may be preferable if you have lots of work to do and want it open in a more "permanent" way. At the moment I set the page as hidden so it actually won't appear under the Setup menu - I can change this, or perhaps I can have a link from the Adminer Tracy panel to open it this way. Any thoughts on which would be best? I think it would be good to add this - I'd use it. Either option would be okay, but my preference would be to see Adminer in the Setup menu. 1
adrian Posted November 1, 2018 Author Posted November 1, 2018 7 minutes ago, Robin S said: but my preference would be to see Adminer in the Setup menu. Done, although just realized I should tweak this so that the PW menu system is retained - coming soon ? 10 minutes ago, Robin S said: But one new issue I noticed is that it seems Adminer expects its root url to always include a query string. I'll look into this shortly.
kongondo Posted November 1, 2018 Posted November 1, 2018 (edited) 35 minutes ago, adrian said: There is one outstanding one on his local Windows dev setup that I can't reproduce at all and he also isn't seeing on a live server. He is getting session_start / headers already sent error. Could someone else on Windows (maybe @bernhard) take a look and let me know if you have the same problem as well. Seeing the warning here as well. Tested on Win 10. Will try tomorrow on Win 7 but I don't think there will be a difference. Issue seems to be session_use_cookies, whether 0 or 1 and/or not ob_start() and ob_flush() at the very top and very end respectively... Edited November 1, 2018 by kongondo 2
Robin S Posted November 1, 2018 Posted November 1, 2018 23 minutes ago, adrian said: Done, although just realized I should tweak this so that the PW menu system is retained - coming soon Personally I'd rather open Adminer in a new tab and have the whole screen dedicated to it. Is there a way you could make it configurable whether to have the PW menu or not? Or perhaps there could just be a small link back to the PW admin root? 1
adrian Posted November 1, 2018 Author Posted November 1, 2018 52 minutes ago, Robin S said: But one new issue I noticed is that it seems Adminer expects its root url to always include a query string. I have this fixed in the Adminer panel version, but struggling to get it sorted in the Setup > Adminer version. Not sure I'll get this sorted tonight before I leave I'm afraid. 34 minutes ago, Robin S said: Personally I'd rather open Adminer in a new tab and have the whole screen dedicated to it. I'll just leave it this way for now then - will tweak when I am back if needed. 2
Robin S Posted November 1, 2018 Posted November 1, 2018 22 minutes ago, adrian said: Not sure I'll get this sorted tonight before I leave I'm afraid. No worries. Big thanks for adding Adminer to Tracy and enjoy your time away. 3
kongondo Posted November 1, 2018 Posted November 1, 2018 7 hours ago, kongondo said: Will try tomorrow on Win 7 but I don't think there will be a difference I can confirm same warning on Win 7. 1
kongondo Posted November 1, 2018 Posted November 1, 2018 And it is really messing up the interface...I'll try and Google the issue when if I get a moment..
adrian Posted November 1, 2018 Author Posted November 1, 2018 @kongondo and @Robin S - can you please try the attached version to see if that fixes those errors on Windows please? ProcessTracyAdminer.module
kongondo Posted November 1, 2018 Posted November 1, 2018 3 minutes ago, adrian said: @kongondo and @Robin S - can you please try the attached version to see if that fixes those errors on Windows please? ProcessTracyAdminer.module Sorry, still doesn't work. Quote Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ....\site\modules\TracyDebugger\panels\Adminer\adminer-4.6.3-mysql.php:151) in .....\site\modules\TracyDebugger\panels\Adminer\adminer-4.6.3-mysql.php on line 71
bernhard Posted November 1, 2018 Posted November 1, 2018 I just installed the version from github and I don't see any errors on chrome/win10... Let me know if I can help with debugging.
adrian Posted November 1, 2018 Author Posted November 1, 2018 I'm on the road now so can't help much but interesting @bernhard isn't having issues. Also weird that the file is referencing itself regarding the headers sent stuff. That said I can't see it being a core Adminer issue either. Hopefully you guys can help to figure it out for me ?
matjazp Posted November 1, 2018 Posted November 1, 2018 @adrian when you get back, please take into account $config->dbPort setting. I'm using non-standard port and this should be honored in ProcessTracyAdminer.module something like that: $port = wire('config')->dbPort ? ':'.wire('config')->dbPort : ''; ... new AdminerProcessWireLogin(wire('config')->dbHost.$port, wire('config')->dbUser, wire('config')->dbPass, wire('config')->dbName), 1
Robin S Posted November 1, 2018 Posted November 1, 2018 13 hours ago, kongondo said: I can confirm same warning on Win 7. I think I might have found the source of this issue. It seems to relate to debug mode in /site/config.php. When debug mode is on I get the session warning and when it is off I don't. Can you confirm @kongondo? 20 hours ago, adrian said: I have this fixed in the Adminer panel version @adrian, this fix isn't working reliably for me. If I visit the "MySQL" root item in the breadcrumbs, then browse into a database table, then click the database name in the breadcrumbs I get a 404. I wonder if the simplest thing might be to reverse your previous fix and make a small modification to adminer-4.6.3-mysql.php: on line 531 change "&db=" to "?db=". Seems to work well here for both the Process module and the panel. BTW, the adminer-4.6.3-mysql.php file is pretty horrible. I get why the project owner wants to compile everything into one file but it results in some weird encoding (PhpStorm gives encoding warnings when the file is opened and is liable to auto-save the file and mess it up in the process) and it's very difficult to debug. Do you think it would be feasible at all to do a custom compilation of the source to make it a bit more readable and leave out the lzw compression? 2
kongondo Posted November 1, 2018 Posted November 1, 2018 46 minutes ago, Robin S said: I think I might have found the source of this issue. It seems to relate to debug mode in /site/config.php. When debug mode is on I get the session warning and when it is off I don't. Can you confirm @kongondo? Spot on! 1
adrian Posted November 1, 2018 Author Posted November 1, 2018 Thanks everyone for the debugging. Would someone (maybe @Robin S) mind putting together a PR with his suggested fix for the &db issue and if you wouldn't mind also @matjazp's request for a custom port. I can easily merge a PR on my phone but not keen on coding ☺
adrian Posted November 1, 2018 Author Posted November 1, 2018 PS - I'll take a look at the possibility of custom compiling when I'm back. Also do you have any ideas on how to get around the debug mode issue?
Robin S Posted November 2, 2018 Posted November 2, 2018 26 minutes ago, adrian said: Would someone (maybe @Robin S) mind putting together a PR with his suggested fix for the &db issue and if you wouldn't mind also @matjazp's request for a custom port. Done. 23 minutes ago, adrian said: Also do you have any ideas on how to get around the debug mode issue? Not sure, but I wonder if it's related to the PHP notices from Adminer & plugins I mentioned earlier in our PM conversation. Maybe with debug mode on the error reporting level changes and those notices are being output somewhere before session start. 2
adrian Posted November 2, 2018 Author Posted November 2, 2018 Thanks for the PR. Maybe we need to get those plugins cleaned up. I'll take a look when I can unless you beat me to it☺
adrian Posted November 2, 2018 Author Posted November 2, 2018 @Robin S - I wonder if a simple temporary solution might be to turn off error reporting at the top of the Adminer process module file? 1
Robin S Posted November 2, 2018 Posted November 2, 2018 3 hours ago, adrian said: I wonder if a simple temporary solution might be to turn off error reporting at the top of the Adminer process module file? Yep, works well here. New PR made. 1
bernhard Posted November 2, 2018 Posted November 2, 2018 No idea, but maybe these informations are helpful: I'm using SessionDbHandler, error reporting E_ALL, laragon, win10; no warnings, no errors; I think it would be great to have the PW logo besides the Adminer logo so that one can go back to the PW admin if one uses the adminer process module from Setup > Adminer (which I prefer). Edit: <a href="/admin/" style="float: left;"> <img src="/wire/modules/AdminTheme/AdminThemeUikit/uikit/custom/images/pw-mark.png" alt="Back to ProcessWire" style=" height: 22px; margin: 5px; margin-right: 5px; margin-left: 10px; "> </a> And on smaller screens: Does anybody know how to inject that into <div id="menu"> ? Maybe some hints @adrian then I can do a PR - just don't know where to inject it properly ?
adrian Posted November 2, 2018 Author Posted November 2, 2018 @bernhard - there is a name () method from Adminer which I think will handle this. Only catch might be not wanting it in the panel version?
adrian Posted November 2, 2018 Author Posted November 2, 2018 7 hours ago, Robin S said: Yep, works well here. New PR made. Thanks @Robin S PR merged and modules directory updated. 2
Recommended Posts