Adding option to settings.dat.php
I am trying to add a new settings option to the settings.dat.php file.
I have placed my settings.dat.php in a data folder outside of my public folder and this is working fine.
When I add the setting option as below (in uppercase), then when I git push changes to the server the setting is removed:
'JWT' => 'XXXXX'
(where the Xs represent an API key)
If I set the option as below (in lowercase) then it is saved as I would like:
'jwt' => 'XXXXX'
Can someone please explain what might be going on here?
This is an interesting issue. I couldn't find anything specific that would cause issue with the setting "JWT" vs "jwt". One question: Is it working as "JWT" in your local environment before deploying with git? My initial thoughts are that it could be something happening in the git deployment process, or perhaps server-specific settings files. A few things I would check:
- In the file where "jwt" worked - try changing it back to "JWT" and re-committing/deploying (if you haven't already).
- Double-check that the settings file that you are adding "JWT" to is the correct file being used in the deployed environment.
- You can check the settings file being loaded on the General Settings page in CMSB under "Server Info" where it says "To change database settings edit:"
Let me know if you have any progress with either of these or any further questions.
Thank you for the reply.
I checked in General settings and the config file is the same one.
The thing is that my gut deployment is only configured to update files in the public folder so I don't understand why the settings file is being updated... Maybe it's a server configuration issue. I will check with the hosting people.
It took me a long time to figure out but at least I have got it working now. I just need to keep it in lowercase!