that .htaccess in public/assets I changed the owner to apache to allow flush to work normally. If I change the owner back to my login user will that allow the flush to work
Hi all, I have a request to disable CMS users after 3 failed login attempts. I'm thinking there would be a module for this but can't find anything right now.
My dev env (not recommending for production) my user owns the file, with the web user group. Both user and group have permission to write.
I found that that didn’t allow a normal flush to work so I changed the user of that 1 file. & have to remember to change it any time I update silverstripe
I changed the user for the .htaccess in both assets and .protected. that got rid of those errors. manually deleting the tinymce .js file it was getting stuck on made it complete the flush without errors
But, .env still doesn’t seem to be recognised. It is still asking for a password to do dev/build in chrome.
are you able to verify that your
.env file is being read?
normally I can switch between environment type dev & live as often as I like just by changing it in .env
but I also found this message in the archive: https://slackarchive.silverstripe.org/slack-archive/message/301680
Did you up the cache folder?Hide attachment content
your site will STOP working though, so don't do that if it's on prod.
instead log out or something instead :)
as in, write out to a log, not "log out" of the site :P
hmmm the archive permalink wasn’t quite right. the message says :
The default admin isn't set anymore, so it tries to hash the password, but the default admin doesn't have a hashing method set.
seems to imply that maybe setting the username/password in .env is not possible anymore
for that person, yeah. There's a missing classname in their database.
probably something you could check :)
I’ve done the _config.php file. Is something supposed to happen?
the site was working fine last time I went on it. now I need to use it again either I forgot that I changed the password & now can’t log in, or something has broken. but I haven’t changed anything on it so don’t see how it could have broken
die will kill execution. You should have a small bit of text though, the output of Environment::getEnv - you should see what you've set in the
.env file for the default admin username.
how do i see it though? I saved the file and nothing happened
any page you try to open
simply trying to load the site should kill it
I went to the site & it still wants me to log in. I have now locked myself out cos I failed log in too many times
Yeah, the site you're editing isn't the site you're viewing then :)
to be triple sure you could edit
public/index.php and put
die('THIS IS THE SITE'); right at the top under the opening
If you don't see that site on your screen, then it is most definitely not the site you're editing the files for.
I've made this mistake many times.
index.php edit kills the site?
you made me think I was losing my mind so i checked!! wierdly though, the .conf file is not currently in sites-enabled. it should be. so I don’t know how I can even get to the log in page in chrome
its very weird. I just created a new subdomain in cloudflare, and a new .conf file for it. & that one also is accessible even though the .conf file is only in sites-available not copied to sites-enabled - which is meant to be a requirement to work
the plot thickens. I tried a different site I havent used for ages that is also not in sites-enabled & also the document root in its .conf file (& the whole silverstripe project) is deleted. That site also goes to a log in page. It is identical to the problem one. there is 1 menu link to a non-password protected page. the page contents is empty. neither of the mariadb databases has an entry in the SiteTree table for a page with that name
could someone have broken into the server & played around?
Seems unlikely, but is possible I guess. Glad you've found an answer though, even if it is just another question 😅
Ive looked further. There’s something making some subdomains point all to the same site. (see my message in channel)
I saw :) No idea though sorry.
Never dealt with either cloudflare or digital ocean I'm afraid. But I can certainly see how that would be troublesome!
it was all going fine until now. its something I haven’t touched in a couple months. The one they are all pointing to is one that i actually need otherwise I would just delete it
fyi I fixed it. I answered my other question as a thread so that the archive has the solution
@Jason Hale Pretty sure that's built in.
@Jason Hale I remember seeing something about setting that in the regular Member class when I was recently reading it to try to figure out some stuff
The system will lock an account for a period of time - reasonably sure that could be configured to be 99billion minutes :P
Is it possible to intentionally add duplicate records to a many_many relationship?
- ID | FooID | BarID | SomeName
- 1 | 1 | 1 | XXX
- 2 | 1 | 1 | XXX
- 3 | 1 | 1 | XXX
- 4 | 1 | 1 | XXX
If I search for XXX in the autolookup field, I want to find the "XXX" record and add it four times.
The current behaviour is that XXXX is added once, and excluded from future searches. Is there a config setting that can override this?
You'd have to drop the auto DISTINCT out of queries.