1

Does anyone have an idea of why I would get this error ?

PHP Fatal error: Uncaught Error: Call to undefined function db_table_exists()

I'm running a script from a working Drupal site, using bash to run an .sh script which has that in the script.

db_create_table also gives the same error.

Do I have to include a file to make these functions available when running from bash although I am running it from the docroot?

closed as too broad by Jdrupal, Jaypan, kiamlaluno Oct 2 at 14:53

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    the db_table_exists function defined in includes/database/database.inc and the database.inc not loaded, i think you should try to add require_once (includes/database/database.inc) to your file, and see . – berramou Sep 26 at 23:51
1

apparently I was using the wrong version of drush in the script that I ran, I needed to run drush8 and was using drush 9.

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