Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 47184

Database driver problem when installing Moodle 3.9

$
0
0
by Joshua Ortega.  

Hello,

I am a bit stuck trying to install Moodle on a new linux server. When I attempt to access the install.php file from my web browser, I am presented with this error message:

Error: database driver problem detected

The site administrator should verify server configuration

PHP has not been properly configured with the MySQLi extension for it to communicate with MySQL. Please check your php.ini file or recompile PHP.

As far as I can tell, the mysqli module is loaded and available to PHP. But Moodle is not recognizing this for some reason. Here is my setup:

  • OS: Fedora release 32 (Thirty Two)
  • PHP Version: 7.4.7 (cli) (built: Jun  9 2020 10:57:17) ( NTS )
  • SQL Server version: 10.4.13-MariaDB-log MariaDB Server
  • Web server: nginx/1.18.0
  • Moodle version: 3.9+ (Build: 20200704) (pulled via git, branch 39 stable)

PHP is running as a service (php-fpm) and even the systemctl status reads the following:

Jul 09 10:27:30 moodle.coastalcc.local systemd[1]: Starting The PHP FastCGI Process Manager...

Jul 09 10:27:30 moodle.coastalcc.local php-fpm[608]: [09-Jul-2020 10:27:30] NOTICE: PHP message: PHP Warning:  Module 'mysqlnd' already loaded in Unknown on line 0

Jul 09 10:27:31 moodle.coastalcc.local php-fpm[608]: [09-Jul-2020 10:27:31] NOTICE: PHP message: PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0

Jul 09 10:27:31 moodle.coastalcc.local systemd[1]: Started The PHP FastCGI Process Manager.


The following list is the output of this command: php -m | grep mysql*

PHP Warning:  Module 'mysqlnd' already loaded in Unknown on line 0

PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0

mysqli

mysqlnd

pdo_mysql


My current php.ini file has the following lines:

extension=mysqlnd

extension=mysqli


I included both modules just to be sure. However, both seemed to be loaded automatically from the /etc/php.d/ directory where the following files exist:

20-mysqlnd.ini

30-mysqli.ini


In addition, the /usr/lib64/php/modules directory lists the following files:

mysqli.so

mysqlnd.so


These modules are owned by root with the appropriate read and write permissions:

-rwxr-xr-x 1 root root


My current moodle config.php file contains the current lines:

$CFG->dbtype    = 'mariadb';   

$CFG->dblibrary = 'native';    

$CFG->dbhost    = 'localhost'; 

$CFG->dbname    = 'moodle';    

$CFG->dbuser    = 'moodleuser';

$CFG->dbpass    = 'password_redacted'


Listing of local databases:

MariaDB [(none)]> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| moodle             |

| mysql              |

| performance_schema |

| phpmyadmin         |

+--------------------+

5 rows in set (0.002 sec)

Listing of local database user:

MariaDB [(none)]> select host,user from mysql.user;

+-----------+-------------+

| Host      | User        |

+-----------+-------------+

| localhost | mariadb.sys |

| localhost | moodleuser  |

| localhost | mysql       |

| localhost | root        |

+-----------+-------------+


I installed php from the official fedora repos with the following command:

dnf install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json


OS is up to date as of 7/9/20.


I am just not sure what I'm missing. Any help would be much appreciated.



Viewing all articles
Browse latest Browse all 47184


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>