TiagoSilvaPereira / vemto2-issues

Repository to track Vemto 2 Issues
5 stars 0 forks source link

schema-reader-db Error: DB connection failed: could not find driver #206

Open fakebizprez opened 2 months ago

fakebizprez commented 2 months ago

Error Message: schema-reader-db Error: DB connection failed: could not find driver

Stack:

schema-reader-db Error: #0 phar://C:/Program Files/Vemto/resources/static/VMTTL2/src/DatabaseManager.php(20): VemtoDBReader\DatabaseManager->connect()
#1 phar://C:/Program Files/Vemto/resources/static/VMTTL2/index.php(94): VemtoDBReader\DatabaseManager->__construct()
#2 phar://C:/Program Files/Vemto/resources/static/VMTTL2/common/Vemto.php(111): {closure}()
#3 phar://C:/Program Files/Vemto/resources/static/VMTTL2/index.php(20): Vemto\Vemto::execute()
#4 C:\Program Files\Vemto\resources\static\VMTTL2(14): require('...')
#5 {main}

Vemto 2.1.3 win32 10.0.22631 Locale: en-US App version: 2.1.3

TiagoSilvaPereira commented 2 months ago

Hi @fakebizprez is the database PHP extension installed?

SlimDeluxe commented 2 months ago

@TiagoSilvaPereira I have the same problem on Fedora 40 and with the mysqlnd PHP extension installed locally (I think it's trying to use it locally?). However the app is in Docker. EDIT: the app is using a mariadb database.

Error Message: schema-reader-db Error: DB connection failed: could not find driver

Stack:

schema-reader-db Error: #0 phar:///tmp/.mount_Vemto-HuoJVR/resources/static/VMTTL2/src/DatabaseManager.php(20): VemtoDBReader\DatabaseManager->connect()
#1 phar:///tmp/.mount_Vemto-HuoJVR/resources/static/VMTTL2/index.php(94): VemtoDBReader\DatabaseManager->__construct()
#2 phar:///tmp/.mount_Vemto-HuoJVR/resources/static/VMTTL2/common/Vemto.php(111): {closure}()
#3 phar:///tmp/.mount_Vemto-HuoJVR/resources/static/VMTTL2/index.php(20): Vemto\Vemto::execute()
#4 /tmp/.mount_Vemto-HuoJVR/resources/static/VMTTL2(15): require('...')
#5 {main}

Vemto 2.1.6 linux 6.10.9-200.fc40.x86_64 Locale: en-US App version: 2.1.6

PHP extensions: php-cli.x86_64 8.3.11-1.fc40 @updates
php-common.x86_64 8.3.11-1.fc40 @updates
php-intl.x86_64 8.3.11-1.fc40 @updates
php-mbstring.x86_64 8.3.11-1.fc40 @updates
php-mysqlnd.x86_64 8.3.11-1.fc40 @updates
php-pdo.x86_64 8.3.11-1.fc40 @updates
php-pecl-zip.x86_64 1.22.3-3.fc40 @fedora
php-process.x86_64 8.3.11-1.fc40 @updates
php-xml.x86_64 8.3.11-1.fc40 @updates

Trying to connect like this (the connection parameters were automatically read from the env file): image

SlimDeluxe commented 2 months ago

Update: the connection parameters were wrong, since those are the internal docker network that the app uses. This is the correct config:

image

However the same error persists. To make sure the database is available, I can connect from the host machine (not inside docker) and it's reachable:

image