pdo_mysql extension is missing in SolusVM PHP 7.3 handler?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Sympthoms

pdo_mysql extension is missing on PHP 7.3 handler provided by SolusVM:

# php -i | grep -i pdo
Configure Command => './configure' ... '-without-pdo-mysql' '-with-pdo-sqlite'
PDO
PDO support => enabled
PDO drivers => sqlite pdo_sqlite PDO Driver for SQLite 3.x => enabled

PHP provided by svmstack-php7 package:

# ls -l `which php`
lrwxrwxrwx 1 root root 32 Sep 20 21:08 /usr/bin/php -> /usr/local/svmstack/php7/bin/php
# rpm -qf /usr/local/svmstack/php7/bin/php
svmstack-php7-7.3.23-4.el7.solusvm.x86_64

Cause

The issue is submitted as a bug #SVM-2899

Resolution

As a workaround

  1. Connect to the node via SSH
  2. Create a directory and change to it:

    # mkdir php
    # cd php

  3. Download the php-mysql package for PHP 7.3 from official remi repository:

    # wget http://rpms.remirepo.net/enterprise/7/php73/x86_64/php-mysqlnd-7.3.27-1.el7.remi.x86_64.rpm

  4. Unpack the package:

    # rpm2cpio php-mysqlnd-7.3.27-1.el7.remi.x86_64.rpm | cpio -idmv

  5. Create the directory for extensions:

    # mkdir /usr/local/svmstack/php/modules/20191201

  6. Move the extension pdo_mysql.so into the created directory:

    # mv ./usr/lib64/php/modules/pdo_mysql.so /usr/local/svmstack/php/modules/20191201/

  7. Add the following line in the PHP ini file /usr/local/svmstack/php7/php.ini:

    CONFIG_TEXT: extension=pdo_mysql.so

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.