Hello Fellow Lucee-ites, I am having issues that I suspect are due to subtle configuration differences between a few sites / contexts and would like to dump the values of all admin settings programmatically.
I am aware I can do this:
Which gets all the methods, but that’s not what I’m after.
Also I believe one could compare lucee-server.xml’s and/or lucee-web.xml’s… which would be very inconvenient. And BTW do these files contain ALL settings?
How do I get what all the settings are set to with script? Is it possible?
OS: CentOS Linux 7.9
Java Version: 1.8.0_181
Tomcat Version :Apache Tomcat/8.5.14
Lucee Version: 126.96.36.199 ( I know. It’s the hand that was dealt)
Thanks andreas, that does indeed work but does not seem complete. I currently know nothing about commandbox. Is there a reference that excels at Commandbox cfconfig?
I have however been digging and it seems I may be barking up the entirely wrong tree.
This is far removed from the original question. Maybe I should start another topic… as soon as I can get to a real keyboard
Still, we need to know what you are looking for or what you you need to have. What results are you getting? What results are you expecting? What information you want to get exactly from your application?
Another alternative would be to use:
cfadmin (I think it’s not fully supported, but should just work), or
However, tell us what you want to know an what you are looking for, and we might give you a better advice.
This is another question. Are you looking for your application settings to see if your ajax endpoint location has session management enabled?
Usually you don’t need to do anything, as soon as the browser gets the session cookies. If it gets the session cookies in the server response, it will send the session cookie automatically all along with the subsequent ajax request. No additional code needed.
If you are loosing the session, check the following (best to be verified within your browsers dev tool through the network tab)
is your server sending the session cookie in the server response header?
is your browser sending the cookies to the ajax endpoint?
do your cookies have certain attributes set, that might block your browser from re-sending cookies, e.g. “https only”, “sameSite” or similar?
are there any browser warnings in the console, like CORS warnings or similar hints?
Of course, you need to make sure first, that the session/client management (in your application.cfc or server/web administrator) is enabled.
Thanks for the wisdom andreas. Your questions are well received. For now, I used the classic work-around to be able to defer this issue until I have the time to address it properly. Since ajax requests should retain the session scope, I really need to do some homework to give decent answers.
This is exactly what I need to find out what’s going on! …technically the best solution to my original question about comparing configs. As to why the session scope disappears, that’s another matter. Hoping CFConfig compare makes it obvious. Thanks
This is probably related to cookies being mishandled. Not saying you shouldn’t go down the path of comparing configs, but I’m not sure you’ll find the answer there. There were actually some bugs in recent versions of Lucee that specifically affected the way cookies were parsed on some servlets, leading to loss of sessions. You mentioned you’re using Lucee 188.8.131.52, but are you sure all servers are on that exact same version?
Thx for your reply. It looks like session and client management are on and stored in a mysql db. There seems to be a lot more stuff in the admin than in the getApplicationSettings dump. Nothing specific
Hi, Yep the lucee version is the same. I have a plethora of items to check on thanks to everybody that has responded. I need to supply some answers. Super busy time for me at the moment. This should be interesting. More info as I gather it.