Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've been running drush fine lately, and for some reason I started getting the following error when I try to run the dl command:
PHP Fatal error: Call to undefined function user_access() in /Users/steve/Sites/cbb/sites/all/modules/rdf/rdf.module on line 24
PHP Stack trace:
PHP 1. {main}() /Users/steve/Sites/drush/drush.php:0
PHP 2. drush_main() /Users/steve/Sites/drush/drush.php:41
PHP 3. drush_dispatch() /Users/steve/Sites/drush/drush.php:91
PHP 4. call_user_func_array() /Users/steve/Sites/drush/includes/drush.inc:51
PHP 5. drush_command() /Users/steve/Sites/drush/includes/drush.inc:0
PHP 6. call_user_func_array() /Users/steve/Sites/drush/includes/command.inc:378
PHP 7. drush_invoke() /Users/steve/Sites/drush/includes/command.inc:0
PHP 8. call_user_func_array() /Users/steve/Sites/drush/includes/command.inc:327
PHP 9. drush_pm_download() /Users/steve/Sites/drush/includes/command.inc:0
PHP 10. drush_bootstrap_max() /Users/steve/Sites/drush/commands/pm/pm.drush.inc:1139
PHP 11. drush_bootstrap() /Users/steve/Sites/drush/includes/environment.inc:252
PHP 12. _drush_bootstrap_drupal_full() /Users/steve/Sites/drush/includes/environment.inc:172
PHP 13. drupal_bootstrap() /Users/steve/Sites/drush/includes/environment.inc:739
PHP 14. _drupal_bootstrap() /Users/steve/Sites/cbb/includes/bootstrap.inc:989
PHP 15. _drupal_bootstrap_full() /Users/steve/Sites/cbb/includes/bootstrap.inc:1078
PHP 16. module_invoke_all() /Users/steve/Sites/cbb/includes/common.inc:2613
PHP 17. call_user_func_array() /Users/steve/Sites/cbb/includes/module.inc:471
PHP 18. rdf_init() /Users/steve/Sites/cbb/includes/module.inc:0
Fatal error: Call to undefined function user_access() in /Users/steve/Sites/cbb/sites/all/modules/rdf/rdf.module on line 24
Call Stack:
0.0008 99900 1. {main}() /Users/steve/Sites/drush/drush.php:0
0.0136 1172236 2. drush_main() /Users/steve/Sites/drush/drush.php:41
0.0805 2481440 3. drush_dispatch() /Users/steve/Sites/drush/drush.php:91
0.0813 2482764 4. call_user_func_array() /Users/steve/Sites/drush/includes/drush.inc:51
0.0813 2482764 5. drush_command() /Users/steve/Sites/drush/includes/drush.inc:0
0.0815 2483568 6. call_user_func_array() /Users/steve/Sites/drush/includes/command.inc:378
0.0815 2483568 7. drush_invoke() /Users/steve/Sites/drush/includes/command.inc:0
0.0826 2491048 8. call_user_func_array() /Users/steve/Sites/drush/includes/command.inc:327
0.0826 2491128 9. drush_pm_download() /Users/steve/Sites/drush/includes/command.inc:0
0.0826 2493796 10. drush_bootstrap_max() /Users/steve/Sites/drush/commands/pm/pm.drush.inc:1139
0.2524 3541532 11. drush_bootstrap() /Users/steve/Sites/drush/includes/environment.inc:252
0.2526 3542316 12. _drush_bootstrap_drupal_full() /Users/steve/Sites/drush/includes/environment.inc:172
0.2526 3583436 13. drupal_bootstrap() /Users/steve/Sites/drush/includes/environment.inc:739
0.2659 4587116 14. _drupal_bootstrap() /Users/steve/Sites/cbb/includes/bootstrap.inc:989
0.2739 5246780 15. _drupal_bootstrap_full() /Users/steve/Sites/cbb/includes/bootstrap.inc:1078
0.9677 21412108 16. module_invoke_all() /Users/steve/Sites/cbb/includes/common.inc:2613
0.9685 21416072 17. call_user_func_array() /Users/steve/Sites/cbb/includes/module.inc:471
0.9686 21416092 18. rdf_init() /Users/steve/Sites/cbb/includes/module.inc:0
Drush command could not be completed.
I've read through this issue and verified that the code in the patch is applied, but I still get the error. If I disable the module in the error message, I get the same error on another module, so it definitely isn't a problem with the module itself
Thanks.
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedmaybe scor can sort this. real odd.
Comment #2
scor CreditAttribution: scor commentedrdf_init() calls user_access(), which must be the reason for this. However I'm not able to reproduce this with Drush 3.x (HEAD) and rdf 6.x-1.0-alpha7. What version of drush and rdf are you using?
Comment #3
smustgrave CreditAttribution: smustgrave at Mobomo commented