1

I got an error message when trying to import Drupal configuration with drush cim, saying the following:

include_once(/var/www/d8site/modules/custom/somemodule/somemodule.module):[warning] failed to open stream: No such file or directory Extension.php:140 include_once(): Failed opening [warning] '/var/www/d8site/modules/custom/somemodule/somemodule.module' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') Extension.php:140

The somemodule.module file was deleted between versions, but it's still expecting it. Restarting and/or reloading Apache didn't get rid of this message, but drush cr did. I don't want to have to clear the entire Drupal cache on production, so how could I update this include list without clearing all cache with drush? If I didn't have pear installed, would this be any different?

1 Answer 1

3

Pear has no connection to this. The error message displays the include path value in brackets for debugging purpose. You can check the value as follows:

drush ev 'print get_include_path();'

In your case the PHP is trying to include the file from this location and emits the error as it fails. /var/www/d8site/modules/custom/somemodule/somemodule.module

My guess the file still presents in Drupal registry because the module wasn't uninstalled properly. Check out this guide to fix it. https://www.drupal.org/node/2487215

2
  • The module wasn't uninstalled, it's just that the .module file was no longer needed, so it was removed. But, thank you for the info on Pear. Nov 7, 2016 at 17:38
  • I would try to reinstall the module then.
    – ya.teck
    Nov 7, 2016 at 18:37

Your Answer

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

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