I have installed SimpleSAMLphp in my project using Composer, configured it and have it working nicely.
Unfortunately, every time I do a composer update the config.php, authsources.php and saml20-idp-remote.php files are deleted.
The documentation suggests a way of providing an alternative location or the config.php file but not for the other two.
Can anyone suggest a setting up SimpleSAMLphp with these files located outside of the vendor\SimpleSAMLphp folder?
I'm currently using a script to copy locally stored copies of these files back to the correct folder on a post-update trigger, but it seems to me to be a bit of a kludge.
Thanks.
SIMPLESAMLPHP_CONFIG_DIR lets you specify the config directory with an env variable. SSP will look in that folder for config.php and authsources.php. You can define where the metadata files are stored with a variable inside config.php
'metadata.sources' => array(
array('type' => 'flatfile', 'directory' => '/your/path/metadata'),
),
The above example will tell SSP to look in /your/path/metadata for saml20-idp-remote.php (and other metadata files)
There can be some other challenges using SSP installed this way - in particular if you need to install additional modules SSP expects them to be in (or symlinked from) it's modules directory.
Related
I'm following the Scripts with Support Files answer from here https://stackoverflow.com/a/46479538/4771016 which works great but running into a problem during the update of my script.
If not found, my script creates an .env file for the users to pass some variables in the same directory as the .sh file lives: /home/linuxbrew/.linuxbrew/Cellar/myscript/1.0.2/libexec/.env the problem is that upon releasing a new version, the .env file won't be in the new directory i.e. /home/linuxbrew/.linuxbrew/Cellar/myscript/1.0.3/libexec/ and thus will be recreated losing the modifications.
Any ideas for keeping that .env file during updates or an acceptable design pattern for my use case? I was thinking about keeping the .env file outside that directory somewhere, but I don't know the Homebrew directory structure well enough to store it in the right place.
I am confused about .env file as when I hosted the laravel application the .env file is missing on the web server. If anybody knows the way how can we find .env file on the server please answer.
Try ls -la to list all files in your web root.
As other have said, it sounds like the file exists but you cannot see it because it is a hidden file (denoted by the . in .env)
For future reference, whilst .env is likely to be excluded in a .gitignore there is often a .env.example which is include that you can copy and modify for your environment.
By default a Laravel app's Git repo will ignore the .env file - it's because you will use this on your development machine to configure the app to work on that environment.
You should have another .env file on your server which provides the configuration required for your app to run in that environment. This file should be maintained between deployments - and most importantly, the credentials inside of it should not be tracked in a repo.
Your .env file is there! It is a hidden file and you can't see it with gui unless if you somehow reveal hidden files! I recommend you to use putty over windows or ssh over linux terminal and edit it if you know how to do that.
By default some files like .env, .htaccess are hidden on the server therefore to see these files we need to set as show hidden files on the server settings.
Currently, for linux operating systems, the cache and index folders for clion are defaulted to /home/.Clion12/. I am on an NFS and want the cache directory and indexing directories to point to my internal ssd. Where can I change this?
I just found the answer to this. In the bin directory where clion.sh is kept, there is an ideas.properties file. You can change the default location there.
As #StevenCombs said, the file idea.properties is in the same bin directory where clion.sh is found, and the variable is idea.system.path.
I set it up like this. First, on the command line I did:
sudo mkdir -p /var/cache/mlakata
sudo chown mlakata /var/cache/mlakata
And then in the ${clioninstall}/bin/idea.properties file, I added
idea.system.path=/var/cache/mlakata/CLion/system
CLion appears to populate the CLion/system directories under my personal cache directory.
The problem was solved for me after I have created an idea.properties file in ~/.Clion2019.2/config then populated it with:
# custom CLion properties
idea.config.path=/someFolder/my_work/clion_ws/.Clion2019.2/caches/trunk-config
idea.system.path=/someFolder/my_work/clion_ws/.Clion2019.2/caches/trunk-system
idea.plugins.path=/someFolder/my_work/clion_ws/.Clion2019.2/caches/trunk-plugins
After this, the cache is build in /someFolder, not flooding my home folder anymore.
Official support page for path parameters
I'm trying to insert the mercurial_keyring file with my username and password in the .hgrc file but it doesn't exist in my user directory on windows. I have tortoise hg installed and even checked if it was installed properly on the command prompt yet I still don't have the .hgrc folder.
Can anyone tell me what might be the reason to it?
Thanks
Because it's %USERPROFILE%\mercurial.ini
Mercurial reads configuration data from several files, if they exist.
These files do not exist by default and you will have to create the
appropriate configuration files yourself:
Local configuration is put into the per-repository /.hg/hgrc
file.
Global configuration like the username setting is typically put into:
%USERPROFILE%\mercurial.ini (on Windows)
The .hgrc files are not created automatically when you install Mercurial or TortoiseHg.
You will need to manually create it at the location you need whether that is within the repository's .hg folder or your own C:\Users\username\ folder.
You will probably need to use the command line to create the file as it's not usually possible to create filenames that start with . in Windows Explorer.
https://www.selenic.com/mercurial/hgrc.5.html
I need to load controllers and models from a different folder than the default one. I am using a Linux system.
I am building a simple CI application for some people, for use on a shared hosting I own. But I want to give them access only to /views folder and some /config files. And this is why I need to store the controllers and models in a different folder on the same level as /public_html folder or maybe somewhere in the linux system.
I consider this would be a better solution than encoding files
CodeIgniter permits you to organize your controllers,views and config files into sub-folders. As far as I know it doesn't permit it for models (at least documentation doesn't mention it, I've not tried myself).
As your are in a Linux system, you can create a symbolic link to reference to another directory in the filesystem.
So you can create the directories:
application/config/public
application/controllers/public
application/views/public
And then create in your /public_html symbolic links ponting to these directories:
/public_html/config -> application/config/public
/public_html/controllers -> application/controllers/public
/public_html/views ->application/views/public
When your customers upload files to /public_html/config, they will be also available in application/config/public. The same applies for /public_html/controllers and /public_html/views.
The command syntaxis to creates symlinks is
# ln -s target name
i.e:
# ln -s application/config/public /public_html/config
If you don't have console access to your hosting you can create the links using the PHP function symlink() .
To load a view/config/controller from a subfolder you only have tu prepend the directory name in the $this->load->...() function call. i.e:
$this->load->view('public/my_view);
Check CI documentation for more info about organizing your files into sub-folders.