Score:0

PDOException could not find driver when pdo_sqlsrv is installed

dk flag
Date: 2022-02-28 15:57:17
Exception detail: /var/log/DirectBuy/root-directbuyla-exp_1280c91f9f.json
Class: PDOException
Line: 138

Documentation Link: No Documentation
Message: could not find driver

====================================
Stack trace:
#0 [internal function]: PDO->__construct('dblib:host=MsSQ...', 'DirectBuyComInv...', '5765f5b668!!!as...', Array)
#1 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(138): ReflectionClass->newInstanceArgs(Array)
#2 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(70): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#3 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ObjectCreator->resolve(Object(DI\Definition\ObjectDefinition), Array)
#4 /var/www/vendor/php-di/php-di/src/DI/Container.php(303): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\ObjectDefinition), Array)
#5 /var/www/vendor/php-di/php-di/src/DI/Container.php(131): DI\Container->resolveDefinition(Object(DI\Definition\ObjectDefinition))
#6 /var/www/vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php(63): DI\Container->get('db.mssql')
#7 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/SelfResolver.php(34): DI\Definition\AliasDefinition->resolve(Object(DI\Container))
#8 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\SelfResolver->resolve(Object(DI\Definition\AliasDefinition), Array)
#9 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php(81): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\AliasDefinition))
#10 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(132): DI\Definition\Resolver\ParameterResolver->resolveParameters(Object(DI\Definition\ObjectDefinition\MethodInjection), Object(ReflectionMethod), Array)
#11 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(70): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#12 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ObjectCreator->resolve(Object(DI\Definition\ObjectDefinition), Array)
#13 /var/www/vendor/php-di/php-di/src/DI/Container.php(303): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\ObjectDefinition), Array)
#14 /var/www/vendor/php-di/php-di/src/DI/Container.php(131): DI\Container->resolveDefinition(Object(DI\Definition\ObjectDefinition))
#15 /var/www/vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php(63): DI\Container->get('DirectBuy.fr.Ca...')
#16 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/SelfResolver.php(34): DI\Definition\AliasDefinition->resolve(Object(DI\Container))
#17 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\SelfResolver->resolve(Object(DI\Definition\AliasDefinition), Array)
#18 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php(81): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\AliasDefinition))
#19 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(132): DI\Definition\Resolver\ParameterResolver->resolveParameters(Object(DI\Definition\ObjectDefinition\MethodInjection), Object(ReflectionMethod), Array)
#20 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(100): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#21 /var/www/proxycache-di/ProxyManagerGeneratedProxy__PM__wpplugindirectbuyProductSyncYToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9.php(54): DI\Definition\Resolver\ObjectCreator->DI\Definition\Resolver\{closure}(NULL, Object(ProxyManagerGeneratedProxy\__PM__\wpplugin\directbuy\ProductSync\YToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9), 'syncNow', Array, Object(Closure))
#22 /var/www/proxycache-di/ProxyManagerGeneratedProxy__PM__wpplugindirectbuyProductSyncYToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9.php(54): Closure->__invoke(NULL, Object(ProxyManagerGeneratedProxy\__PM__\wpplugin\directbuy\ProductSync\YToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9), 'syncNow', Array, Object(Closure))
#23 /var/www/public/wp-content/plugins/directbuy/SettingForm.php(60): ProxyManagerGeneratedProxy\__PM__\wpplugin\directbuy\ProductSync\YToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9->syncNow()
#24 /var/www/public/wp-includes/class-wp-hook.php(287): wpplugin\directbuy\SettingForm->syncProducts('')
#25 /var/www/public/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#26 /var/www/public/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#27 /var/www/scripts/run-action.php(41): do_action('direct_buy_impo...')
#28 {main}

I am running a docker container and I am getting the above error. I thought it was because I was missing the pdo mssql module, but after doing php -m after doing docker-compose exec php bash, I got:

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
pdo_sqlsrv
Phar
posix
readline
redis
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

So what's the issue? I already have it installed and configured since the plugin is active. What's wrong?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.