I'm running php 8 on Linux Mint and have installed it by compiling the source code (a first for me). I've also had success compiling and installing several php extensions. However, i'm having trouble installing the "pdo_mysql" extension.
I've already compiled and installed the "mysqlnd" module. However, this issue arrises after I compile and install the "pdo_mysql" module:
$ php -m
PHP Warning: Cannot load module "pdo_mysql" because required module "mysqlnd" is not loaded in Unknown on line 0
Has anyone else encountered this or know a fix for it?
Thank you
CodePudding user response:
Try
sudo apt install php8.0-mysql
CodePudding user response:
Fixed problem by recompiling PHP as a whole with pdo mysql option:
./configure --with-pdo-mysql=mysqlnd
This is opposed to compiling and installing the mysqlnd extension on its own after having already compiled PHP.
I'm going to assume that if you want those extensions enabled, you must declare so while compiling PHP itself, given that compiling and install them seperately did not work for me.