Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error "number of bound variables does not match number of tokens" on bcim in a global install #257

Open
robertgarrigos opened this issue Nov 10, 2022 · 4 comments

Comments

@robertgarrigos
Copy link
Member

robertgarrigos commented Nov 10, 2022

I had this error when trying bcim in a global installation of drush:

PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT name FROM {system} WHERE type='module' AND status=1; Array
(
    [:type] => module
    [:status] => 1
)
 a drush_db_select() (línia 131 de phar:///usr/local/bin/drush/includes/dbtng.inc).
Drush command terminated abnormally due to an unrecoverable error.                                                  [error]
Error: Return type of HumbugBox3140\KevinGH\RequirementChecker\RequirementCollection::count() should either be
compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice in phar:///usr/local/bin/drush/.box/src/RequirementCollection.php, line 19

I have to say that I'm doing bcim on the lando dev site with NO problem. This is related to the same production site, with a globl drush and NO lando.

@laryn
Copy link
Member

laryn commented Dec 12, 2022

@robertgarrigos Please test #251

@robertgarrigos
Copy link
Member Author

robertgarrigos commented Dec 22, 2022

Thanks, @laryn, but this didn't fix the problem. In fact, I just realized that I have an error by running just drush without any parameter, either with my last version of the extension or with this fix applied:

PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens  [error]
in /core/includes/database/database.inc:2285
Stack trace:
#0 /home/robert/www/core/includes/database/database.inc(2285): PDOStatement->execute()
#1 /home/robert/www/core/includes/database/database.inc(717): DatabaseStatementBase->execute()
#2 /home/robert/www/core/includes/database/database.inc(2468): DatabaseConnection->query()
#3 phar:///usr/local/bin/drush/includes/dbtng.inc(131): db_query()
#4 /home/robert/.drush/commands/backdrop-bug/BackdropBoot.php(618): drush_db_select()
#5 /home/robert/.drush/commands/backdrop-bug/BackdropBoot.php(594): Drush\Boot\BackdropBoot->module_list()
#6 phar:///usr/local/bin/drush/includes/command.inc(1594): Drush\Boot\BackdropBoot->commandfile_searchpaths()
#7 phar:///usr/local/bin/drush/includes/bootstrap.inc(358): _drush_find_commandfiles()
#8 phar:///usr/local/bin/drush/includes/bootstrap.inc(509): drush_bootstrap()
#9 phar:///usr/local/bin/drush/commands/core/help.drush.inc(103): drush_bootstrap_max()
#10 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_help()
#11 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks()
#12 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#13 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch()
#14 phar:///usr/local/bin/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#15 phar:///usr/local/bin/drush/includes/startup.inc(465): drush_main()
#16 phar:///usr/local/bin/drush/includes/startup.inc(369): drush_run_main()
#17 phar:///usr/local/bin/drush/drush(114): drush_startup()
#18 /usr/local/bin/drush(14): require('...')
#19 {main}

However, I'm having this only when I run the command within the backdrop site. Outside it I get a list of commands, this is, the normal answer.

@laryn
Copy link
Member

laryn commented Dec 22, 2022

I'll be honest, I've started switching to use bee where possible. I've seen this error too on PHP 8.x with Backdrop and Drush but I have not solved it completely.

@dstorozhuk
Copy link

Is 2024 now, and this "key" issue, which prevents site from installing does not fixed yet. If this project is dead - why not deprecate the repository?
ddev, lando still installing that extensions by default, and it is not working!
I spend 4 hours trying to figure out why "official" instructions/plugins does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants