I have Drupal 7 setup with Composer Manager installed in it. I wanted to set-up the website in dev environment hence took DB backup and files from the production environment, and installed it in dev environment.
Now whenever I am trying to check Status Report (Reports => Status Report) or want to go in Composer manager (Configuration => System => Composer Manager) I am getting following error:
RuntimeException: Error creating directory: /path_to_drupal_root_dir/sites/default/files/composer in composer_manager_file_dir() (line 299 of /path_to_drupal_root_dir/sites/all/modules/composer_manager/composer_manager.module).
Thought this might be the issue with folder permission, but it had proper permissions. So using drush I checked the composer variables.
drush vget composer
There I came to know that the value of the variable composer_manager_file_dir is holding the path of composer directory from production environment, and it's value/path needs to be changed according to dev environment's composer directory location.
So I tried to change that variable's value using following drush command:
drush vset composer_manager_file_dir 'C:\path_to_drupal_root_dir\sites\default\files\composer'
The command only changed the variable's value for the moment, but somehow the old value gets set back again.
So I tried to changed it with variable_set() method in some custom module as follows,
but I don't know why it changes for the moment and again rollbacks to the old value.
Any help with on this will be appreciated. Thanks in advance.