What does this mean ?
2020-06-07 09:39:15 Warning: DebugKit is disabling itself as your host www.wmc.fr
is not in the known safe list of top-level-domains (localhost, invalid, test, example, local)
What does this mean ?
2020-06-07 09:39:15 Warning: DebugKit is disabling itself as your host www.wmc.fr
is not in the known safe list of top-level-domains (localhost, invalid, test, example, local)
It means that you’ve got debug
set to true on a site that Cake thinks is likely a production site, and it’s disabling DebugKit as a security precaution. See the documentation on configuration if you really do need to enable DebugKit on this server, or turn off debug
if it’s a production server that accidentally has it left on. If you’re debugging on that server, but don’t need DebugKit, then just ignore the warning.
Although it’s a development site, nothing differs from a standard public site.
Thank you
As the error message says, there are only a few TLDs that DebugKit recognizes as being for development. If yours is not one of those, then the documentation shows how to change that list.
OK.
I’ll read the docs when I need it.
Thank you again.
In which file do I make this configuration:
//Allow e.g. http://foo.bar.dev or http://my-shop.local domains locally
Configure::write(‘DebugKit.safeTld’, [‘dev’, ‘local’, ‘example’]);
Thanks.
/path_to_application/src/Application.php
I am having an issue like this. I have a personal page with a .org TLD. I tried the line Configure::write('DebugKit.safeTld', ['dev', 'local', 'example', 'org']);
This did not work, still do not get the debugkit panels.
Next I tried Configure::write('DebugKit.forceEnable', true);
This is also not working.
I am running the app in a docker container and wonder if that plugin lacks permission to write out its db, could this be my problem? If so, how do I give it the needed permissions.
Thanks.
Dave.
did you enable debug mode? forceEnable only “grabs” if the normal debug mode is enabled.
Yes, I think it enabled debug mode correctly. I have these lines in my app.php file
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
'DebugKit' => [
'ignoreAuthorization' => true,
],
I hope that ignoreAuthorization setting is not messing it up?
Thanks.
Dave.
Lets go back a bit and tell us what exact error do you get.
Does the iframe icon at the bottom right appear?
Do you have a value set for DEBUG in your environment (whatever is being used to set that in your case)? You’re setting the debug here based on that setting, so if it’s false then you’re disabling debugging here.
Thanks for the response. I noticed a warning in one of the log files, I think it was the debug log. It was very similar to the one on this post something like " Warning: DebugKit is disabling itself as your host www.wmc.fr
is not in the known safe list of top-level-domains (localhost, invalid, test, example, local)"
I read this thread and tried to apply those fixes.
Still not working.
Thanks.
Dave
I am not sure. I am setting it to true in app.php.
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
'DebugKit' => [
'ignoreAuthorization' => true,
],
phpinfo - has multiple debug values - these appear to be set to false.
I am getting warning messages reported in my browser.
How can I check the value in the browser for DEBUG?
Thanks.
Sorry, I missed your second question. I do not see an ifram icon in the bottom right.
Dave.
This does not necessarily set it to true. It sets it to whatever value DEBUG has in your environment, defaulting to true if there is no such setting.
To check that value, you could do something like echo 'DEBUG is ' . env('DEBUG');
though this will give you an ambiguous result if it’s null or false. Mix in things like gettype
to check more thoroughly.
Thanks, that is promising.
I did a call with these lines
`<?= 'DEBUG is ' . env('DEBUG'); ?>
<?= debug(env('DEBUG')); ?>`The first line returned nothing after the text.
The second line gave me a debug greyed section with a null.
How do I set the env DEBUG value in a docker container running my code?
I’ll look online too, but if there is a link or something you guys can provide that would be great.
Thanks.
Dave.
If debug(...)
gives you any output it does confirm that debugging is turned on. I only didn’t suggest using that because, if it’s not, you won’t see anything from it, and that’s not particularly useful.
Thanks, yes, that makes sense. Now just need to figure out how to set my env variables and I should be set.
I am getting an iframe, but it is blocked/invisible - I am not sure what is blocking it.