I've recently started to use configuration files to save my app settings. I currently have this code. However it doesn't save the configuration file. It always return false status when saving. I've checked and I've got 777 permissions on that file(application.php). What could be the problem?
I've solved the saving problem. But I just now realised, that saving one of my keys this way also deletes all the other keys saved in the same file. Is this a normal?
If you save to an existing config file, you have to make sure you have loaded it's contents first, before making changes.
Saving a config with just dump whatever is loaded, it does not merge with the data already on disk, it does the merging in memory (which is the only way to delete existing keys).