I'm trying to run a php script from the command line via Drush. When I tried to use EntityFieldQuery...
$query = new EntityFieldQuery;
I got the error:
PHP Fatal error: Class 'EntityFieldQuery' not found in /path/to/my/script.php on line 43
So, I tried to make it even simpler, and just used this script:
<?php print "inside script\n\n"; $user = user_load(1); print "name: ".$user->name; ?>
But I get the error:
PHP Fatal error: Call to undefined function user_load() in /path/to/my/script.php on line 17
It doesn't appear that drush is bootstrapping properly. Am I missing something? What do I need to do for drush to be able to use the drupal apis?
I read through Drush php-script | Drupal functions such as node_load() are not being found, but I've got mysql client libraries already installed so that isn't a solution for me.