When I tried to start the Nuxeo CMF server after setting "nuxeo.force.generation=false" in "nuxeo.conf" file, it shows like you should either set it to "true" or "once" or otherwise set "nuxeo.wizard.done=true". If we set it to true, the changes will be lost. What will happen if we set it to "once" or otherwise by setting "nuxeo.wizard.done=true". I want to make the changes permanent to the Nuxeo CMF interface.
Thanks & Regards,
Rajesh
What changes do you want to keep?
If you want to customize some files (such as contributions in nxserver/config/), then you have to use the configuration templates and create a custom configuration template.
If you want to customize, for instance, some files in nuxeo.war, then you have to create a Nuxeo bundle.
Related
So the problem is that all developers need different settings for their local testing, but the settings file is part of the project (unlike the nbproject folder for example that we all ignore). I know about .htignore, but the filter only applies to files that are not part of the project.
If I forget the file, then this removes it from the "global" repository, where we have a "holder" version of the settings file.
Right now we just don't commit that file, but every now and then somebody forgets and pushes his own settings, which then are synced back to other developers and it's a constant pain. We just want to "automatically" not push that file. Is there a solution to this? Are we doing something wrong?
You could add a precommit hook that gives an error every time you try to commit this particular file.
To handle the case of developers that forget to setup such a hook, you can also add a serverside hook that will reject their push.
Those are asked during the installation, but are not anywhere in config files\tables to change afterwards
EDIT:
The changelog states the following:
[#MODX-760], [#MODX-1080], [#MODX-1528] Added setup option to set new_file_permissions and new_folder_permissions in welcome view
[#MODX-760], [#MODX-1528] Removed new_file_permissions and new_folder_permissions system settings from setup
Seems kinda weird to me to do that... I am still in need to change them, though.
It appears that these should be in your MODX System Settings although I wasn't able to locate them in any of my own MODX installs (all Revo 2.1+). There's a chance they might be redundant or are for some reason not being properly created during installation (in which case it might be an installer bug).
You might be able to override them by adding those settings, like so:
Key: new_folder_permissions
Value: 0755
Do that and then try creating a new folder using the File Manager. Let us know if the correct permissions are then being used. If so I'll look at opening up a bug report for the installer.
They are not in System Settings, as they default to the PHP umask values, as they should. If you want to override them, you can do so by adding the settings "new_file_permissions" or "new_folder_permissions" to your System Settings.
apache/webuser needs to write to:
core/cache
core/export
core/config/config.inc.php [change back after install]
core/packages
core/components
assets/components
EDIT Sorry, take a look here: core/model/modx/processors/system/filesys/folder/create.php
they appear to be hard coded in that file.
I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
I would like to put some of my app config data in php.ini
I tried just to add new values there and then get them with ini_get
I get nothing displayed.
Do I need to define new entries in an extension?
I know I can create a config file/ini file and easily parse it with PHP, But I want to avoid that.
I do that as I assume it is being loaded once per process.
I do not give here the big big picture, as I want to keep it as much as possible only a technical question, sadly, this platform does not allow debates.
I do need it inside the php.ini
Have you looked at get_cfg_var( config_var )?
http://www.php.net/manual/en/function.get-cfg-var.php
I believe this is for retrieving custom variables from e.g. the servers php.ini file
Don't use php.ini to configure your application, it's not the right place (as the name says, it's intended to configure php, not any application using it).
If you want to use ini files for your application's configuration, have a look at parse_ini_file()
When I use typesafe application settings, I have something like this in my app.exe.config file:
<setting name="IntervalTimeout" serializeAs="String">
<value>10</value>
</setting>
The Settings.Designer.vb does something like this:
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("10")> _
Public ReadOnly Property IntervalTimeout() As Integer
Get
Return CType(Me("IntervalTimeout"),Integer)
End Get
End Property
And I can access the setting with something like this:
Settings.IntervalTimeout
What is the best practice for monitoring changes to this setting from the outside. I.e. the setting is used by an application that is running as a service and when somebody opens the corresponsing config file and changes the IntervalTimeout to let's say 30, the service application gets notified and does whatever I tell it to do to reconfigure itself.
Usually, I would have used something like this during initialization:
AddHandler Settings.PropertyChanged, New PropertyChangedEventHandler(AddressOf Settings_PropertyChanged)
And then implement an Eventhandler that checks the name of the property that has changed and reacts appropriately.
However, the PropertyChanged event only gets fired when the Set method is called on a property, not when somebody changes the data directly within the file. Of course this would have been heaven, but understandable that this is not the way it works. ;-)
Most probably, I'd implement a filesystemwatcher to monitor changes to the file and then reload the configuration, find out what changed and then do whatever is necessary to reflect those changes.
Does anyone know a better way? Or even a supported one?
ASP.NET monitors the Web.config file for changes. It does this using the System.Web.FileChangesMonitor class (which is marked internal and sealed), which uses another internal class System.Web.FileMonitor. Have a look at them in reflector. It might be too complex for your problem, but I'd certainly look into it if I had a similar requirement.
This looks pretty complex. Bear in mind ASP.NET shuts down the old application and starts a new one once it detects a change. App.config wasn't architectured to detect for changes while the application is running. Perhaps reconsider why you need this?
An easier approach is to restart the service once you've made the change.