Score:-2

When installing, I get the "Undefined constant PDO::MYSQL_ATTR_SSL_CA in Drush\Sql\SqlMysql->creds()" error

sh flag

I am trying to install Drupal 10 on a CentOS LAMP stack.

PHP version: 8.1
MariaDB version: 10.5.21-MariaDB-cll-lve-log

I did that:

cd WEB_APPLICATION_ROOT_DIR
composer create-project drupal/recommended-project WEB_APPLICATION_DIR_NAME
cd WEB_APPLICATION_DIR_NAME
composer require drush/drush

Then, I did this: vendor/bin/drush site:install and then I got this:

Undefined constant PDO::MYSQL_ATTR_SSL_CA in Drush\Sql\SqlMysql->creds() (line 65 of /RELEVANT_PATH/vendor/drush/drush/src/Sql/SqlMysql.php).

I have searched the bold text of the error in Google and found things from years ago about Drupal 7. I don't know what's needed for Drupal 10.

How to solve that problem?

id flag
Is the PHP-PDO package installed on the server?
alhemist avatar
sh flag
As it is a shared hosting I don't know, I have asked the support staff to enable both `pdo` and `pdo-mysql` for all the Cpanel account and still waitining for a reply. I didn't think about asking **only** for `pdo-mysql`, should I?
id flag
Questions about Linux packages can be asked and answered on Stack Overflow. For example https://stackoverflow.com/questions/51463117/pdo-not-found-centos7-php7-1
cn flag
Unfortunately we can't support questions about which packages should be installed for a particular platform/OS, it's too dependent on the environment specifics which we don't have access to. For the record, pdo is a required dependancy of pdo-mysql so you can't install the latter without the former anyway.
Score:0
id flag

The platform does not meet Drupal’s PHP requirements because it doesn’t have PDO.

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.