1

So, I've been struggling with some problems with composer and drupal 7. I have composer and composer manager installed because of dependencies for the OpenLayers Module. I don't think I use these dependencies since the site works fine without them installed, but I've run into an issue where I need to fix a composer error in my production environment which is on a shared host and I can't install composer. Most recently, I've just been trying to correctly install the dependencies and then move the files to my live server and hope everything works out. The issue is that when I moved the database to the development machine, the composer file directory is still set with the path from the live server. Anytime I try to navigate to Configuration => System => Composer Manager, or to Status Report, I get the following error:

RuntimeException: Error creating directory: /home/phislub9/public_html/sites/default/files/composer in composer_manager_file_dir() (line 299 of /var/www/html/psrlivetoupdate/sites/all/modules/composer_manager/composer_manager.module).

The issue is that this path is now effectively hard-coded, unless I alter it in the database. So, how can I fix this, and what the correct process for installing these dependencies.

1 Answer 1

2
RuntimeException: Error creating directory: /home/phislub9/public_html/sites/default/files/composer in composer_manager_file_dir() (line 299 of /var/www/html/psrlivetoupdate/sites/all/modules/composer_manager/composer_manager.module).

Is this location, sites/default/files/composer not accessible?. I think you probably need to update some permission or maybe create the file manually. This means that you can't upload files.


I think the variable is composer_manager_vendor_dir

If so, running this,

drush variable-set composer_manager_vendor_dir 'path_here'

Would update it.

If that's not the variable, running

drush variable-get 

Should list all the variables and it's just searching which is the right one.


I've run into an issue where I need to fix a composer error in my production environment

You should consider not moving your database from Development to Production for this exact reason.

Check the Features module and other ways to move configuration into production, without having to import the database.

Always move your database from Production to Development, and move code from Development to Production.

This way, if you had to change something or apply a fix, it would be on your development environment, not on production.

4
  • 1
    I would just add that you can also get at this through the devel variable editor, thanks for pointing the way.
    – nizz0k
    Commented Mar 15, 2017 at 5:38
  • 1
    Sure thing. Hadn't seen that module before. Thanks for pointing it out!
    – rovr138
    Commented Mar 15, 2017 at 5:39
  • 1
    it's the very last menu item under development under home in the admin menu
    – nizz0k
    Commented Mar 15, 2017 at 5:40
  • 1
    Ah, I see it! It's literally right there. Wow, I don't think I had ever looked at it too much! Thanks!
    – rovr138
    Commented Mar 15, 2017 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.