Lost my Site UUID in drupal 8 and can't find it - configuration

I Accidently removed my sites/defaul/files/conf_* folder. I want to recreate it but can't seem to find my UUID hash anywhere. Does anyone have an idea where to find it ?

At the end of your sites/default/settings.php file, you'll see strings like $config_directories['active'] and $config_directories['staging']. There, you'll be able to see your config folder hashes.

Related

Corrupt Wampserver - how to recover?

My laptop crashed this morning after which the wampmanager.ini was corrupted. I found out how to resolve that by pasting in a replacement and ensuring that this line pointed to the correct directories:
Action: run; FileName: “c:/wamp/bin/php/php5.4.3/php-win.exe”;Parameters: “refresh.php”;WorkingDir: “c:/wamp/scripts”; Flags: waituntilterminated
However, I still get an error "Exception Eception in module wampmanager.exe at 000F15A0. Could not execute run action: The directory name is invalid.
I have check: “c:/wamp/bin/php/php5.4.3/php-win.exe” and “c:/wamp/scripts”. I even pasted them into the address line at the top of the page to make sure and they were found.
What are my options please?
Can I run a repair?
Is it just quicker to reinstall?
If I reinstall which directories do I need to copy in order to save my database?
I do not know much about this so if you can be specific please that would be very much appreciated (e.g., full file paths where possible).
Thanks,
Glyn
I have found this:
http://forum.wampserver.com/read.php?2,71125,printview,page=1
https://superuser.com/questions/373255/wamp-not-working-on-windows-7-64bit
Now I need to work out whether I am using WampServer 32 bit or 64 bit. How do I do this please?
You are nearly there, wampmanager.ini is recreated every time you run wamp. What you actually need is an uncorrupted wampmanager.tpl.
If you have a backup, replace the wampmanager.tpl file in \wamp
SECOND ANSWER:
You could try this.
Rename the old wamp folder.
Install WAMP again, using the same version of wamp Apache,MySQL.
Copy your database's from old location to new location + any website code.
That should get you back to where you were roughly.
In my case it happenned because I moved by mistake folder "scripts" from "C:\wamp" to "C:\wamp\tmp". I put it back and it works now.
I found this soltion looking in "wampmanager.ini" (section [StartupAction]) the directories expected to find, and I saw that "scripts" was missing.

PHPStorm Find and Replace in All Files Except One

Sometimes when I do a find and replace for a string in my project, I'd like it to be committed to all directories / files except one. Is there a way to exclude a particular file in the GUI screen that appears before you commence your search?
This link might help you.
No need to upvote or accept my answer if it works for you :)
Exclude folder from search but not from the project list
Or this, using scopes: How to exclude files/folders from code inspection in PHPStorm?

Not able to make calls to mod_roster_odbc functions

I tried to use my own custom roster by integrating mod_roster_odbc. I changed the config file too (commented out mod_roster and make a new entry for mod_roster_odbc). After running with this setup, mod_roster_odbc module is getting started ( I put some logs to in start function, those I can see). But none of other function is not getting called as I alter presence or logged out/logged in.
Please help to identify where I am making the mistake.
I think I know the answer to this. many websites tell you to use mod_roster_odbc.erl to create your own rostering. I believe thats your problem. Many of the functions are merged into mod_roster.erl file itself. I dont think this is mentioned anywhere.
So what you need to do is in ejabberd.cfg enable mod_roster_odbc but dont remove the mod_roster.erl file with the odbc file. This file will take care.
Finally you need to create a rosterusers table (or something like it) so that ejabber can query for friend list. After these changes, just restart ejabber server and you should be good to go. hope this helps.

Hard link to a file not working as expected on OS X

I've a file in a folder and I don't know anything about this file (how it's generated and updated) because it comes from an application running on my system of which I don't have the source code.
The file format is clearly json and I successfully created an hard link to it (using the shell command ln file hardLinkToFile) and placed it on another directory.
At this point I check the "2" files and they are exactly the same as expected, but when I perform an action in the application that cause an update of the original file the hard link doesn't get updated.
Any idea on how I can solve this problem?
UPDATE: As pointed out by both Vlad Lazarenko and mvds the file probably get deleted and a new one is created, is there something I can do to obtain a solution equivalent to the hard-link one I thought initially about?
If a hard link is not getting updated, it means that application is removing the old file and creates a new one. Thus, you still have a hard copy of the previous file, but new file has a totally different inode, though path is still the same. You can verify it simply by changing the content of that file yourself - the link should get updated.
I am getting the same behavior in TextEdit, but not in TextMate. I would suspect this is due to the revision control built in to OS X Lions document architecture. TextEdit uses versioning, while TextMate does not. Most likely this function replaces the file instead of changing it, as described by #Vlad Lazarenko.
#Vlad and Francesco. It's really in this way. I verified that vi leaves the inode unchanged and the src and dest file are both changed, while e.g. the kate editor doesn't and I was getting mad to understand why the changes I made in the src file weren't also in the dest file.
You can easily check this with the command ls -li srcfile destfile before editing one of them with each editor I mentioned.
By the way it's not nice that the hard link are application dependent
I guess it is a bit too late...
Anyways, accidentally I found that, if you change the default app for the file, the hard link gets separated from original file. Even if you click on change all and do not relate to that specific file.

New to CakePHP -> How To Add Columns To a MySQL Table?

I had a website made for me a long time ago, and the programmer did it in CakePHP. I'm now editing his scripts.
I added a couple columns to a table, and found that doing saveField() on the new column does not do anything. How do I make CakePHP recognize the new columns?
I'd appreciate your help. I'm not too familiar with CakePHP, so please go easy on me =)
The cache data is saved in YourAppFoloer/tmp/cache/models (delete the files there-in)
You can also try Cache::clear()
http://book.cakephp.org/view/1382/Clearing-the-Cache
Edit - this looked horrible in the comment:
You could add it to a controller to call:
function superHandyCacheClearer() {
$this->autoRender = false;
Cache::clear();
}
And call www.yourcakeapp.com/yourControllerYouAddedItTo/superHandyCacheClearer - but really, this is when you're making changes whilst in the code. Deleting the cache folder contents, really, should be the fix
make sure that the cache folder is still laid out like it was initially
cache
models
persistent
views
And that they are all 'writable' by the webserver, also note that unless you are running with a debug level of 0 some cache files may not be created every request. But remember that anytime you alter the model files or the database itself you should clear the cache/models folder.
HTH