Class "Doctrine\DBAL\Platforms\MariaDB1010Platform" not found

Hi,

we had the app running in /htdocs/dams, but now moving it to the web farm servers under the root folder /htdocs

all of a sudden we encounter various dbal errors

/vendor/doctrine/dbal/src/Driver/AbstractMySQLDriver.php(42): Class “Doctrine\DBAL\Platforms\MariaDB1010Platform” not found

we literally copied the contents of the old /htdocs/dams/ into the new /htdocs, did composer updates, and still the above message occurs. deleted the vendors folder and .lock and update. re-generated from phpM and upload with the same results.

not sure if it has to do with the htaccess, we copied the previous htaccess file with no effect.

stripped down htaccess as the devsite was using…

# Enable URL rewriting
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
Options -Indexes

on the dev server the same code is running but in /htdocs/dams, so we are just moving it up 1 level to the root htdocs of the new app server,
php v: 8.3.19

not sure what has gone wrong or what was missed

You probably have different versions of PHP on your development and production servers. If your production web server is running PHP 8.3, set Target PHP version to “8.3” and generate again and run composer update again. Then delete the “vendor” folder (under /htdocs) on your production server and upload again.

You better always use the same PHP version on your development and production server to avoid such discrepancies.

thanks i’ll try this,

the dev system is: 8.2.12
the old linux server is: PHP 8.3.17
the new linux servers are: PHP 8.3.19

Update:

the linux flavours are the same on all the servers - tumbleweed. the old linux server with php 8.3.17 was upgraded to php 8.3.19 ot match the 5 new web servers.

the app is still running successfully on the old server with 8.3.19,.

we then copied the app to the servers and still the app fails with:

srv/www/htdocs/dams/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php(101): An exception occurred in the driver: No such file or directory

Debug

#0 /srv/www/htdocs/dams/vendor/doctrine/dbal/src/Connection.php(1976): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() #1 /srv/www/htdocs/dams/vendor/doctrine/dbal/src/Connection.php(1924): Doctrine\DBAL\Connection->handleDriverException() #2 /srv/www/htdocs/dams/vendor/doctrine/dbal/src/Connection.php(385): Doctrine\DBAL\Connection->convertException() #3 /srv/www/htdocs/dams/vendor/doctrine/dbal/src/Connection.php(458): Doctrine\DBAL\Connection->connect() #4 /srv/www/htdocs/dams/vendor/doctrine/dbal/src/Connection.php(416): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #5 /srv/www/htdocs/dams/vendor/doctrine/dbal/src/Connection.php(323): Doctrine\DBAL\Connection->detectDatabasePlatform() #6 /srv/www/htdocs/dams/src/phpfn.php(2049): Doctrine\DBAL\Connection->getDatabasePlatform() #7 /srv/www/htdocs/dams/src/definitions.php(32): PHPMaker2024\dams\ConnectDb()

the db is on another server, don’t suspect its the db…

i can’t figure out what we missed on the new servers, especially all 5 are behaving identially, but the prior server is running the app correctly…

Make sure the selected MySQL driver for the project is installed on your server.