Moodle Error: database driver problem detected - php

I Have installed Moodle Version MOODLE_39_STABLE following the original documentation: https://docs.moodle.org/310/en/Step-by-step_Installation_Guide_for_Ubuntu
During the installation of Moodle, I am facing the issue
Error: database driver problem detected.The site administrator should
verify the 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.
I have gone through several forums, StackOverflow tasks enabled php7.4_mysql extension uncommented the extension=mysqlnd.so in my php.ini file restarted the apache server but there is no use.
Please let me know what exactly I am doing wrong.
Server: Ubuntu 18.04
Web server: Apache2
Php : Php 7.4
Moodle Version: Moodle 39_stable

It seems you have mysql extension installed and you need mysqli (i stands for improved) extension: https://www.php.net/manual/en/book.mysqli.php

Related

missing oci.dll and failed to load php_oci8.dll [duplicate]

I installed oracle 11g and I did create some tables and manipulate it using sql developer, and I am looking for a way to connect oracle with php on hosting site.
I tried but I get error after using this code:
$Conexion_ID =oci_connect($OracleUser, $OraclePassw, $OracleIP);
this is the error:
Call to undefined function oci_connect()
I've known that I should install and configure OCI8, so I downloaded this file:
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
but I don't know in which folder should I them to make the connection work well.
Download the PHP Extension from here(Confirm the PHP Version and download for the same, the thread safe[TS] version):
http://pecl.php.net/package/oci8/2.0.8/windows
You should be able to find three .dll's
php_oci8.dll, php_oci8_11g.dll and php_oci8_12c.dll
Place all dll's in extension directory, in WAMP it is generally wamp\bin\php\php5.*.*\ext
open the php configuration from the System try of wamp server and add the line:
; Enable only which is required
;extension=php_oci8.dll
extension=php_oci8_11g.dll
;extension=php_oci8_12c.dll
Restart the Apache server.
EDIT : Sorry I thought the other dll's are the libraries, but instead they are for different oracle versions. In your case enable 11g. Answer updated.
Update 2016-11-07: just wanted to say that latest package can be found here https://pecl.php.net/package/oci8. When I wrote this answer 2.0.8 was latest i guess.
if you are using wamp server on windows than you have to use the php_oci8.dll not the oci8.so. You need to download php_oci8.dll and copy it to ext directory under the PHP. If you don't have this extension in your PHP than install it and go to php.ini and add extension=php_oci8.dll.
Please make sure that wamp server have two php.ini files you have to change it on both the places. once everything is done than check with php info that oci 8 installed or not.

Website Hosting issue in web Server 2012

While hosting official website,localhost not opening.Error display stating "Your PHP installation appears to be missing the mysql extension which is required by wordpress" provided that Apache and MySql are running.RESPECTIVE VERSIONS ARE OF SOFTWARES BEING USED.
XAMPP 7.0.8
MYSQL 5.6.24
APACHE 2.4.18
WORDPRESS 5.7.1
PHP 7.0.8
I think you don't have the MySQL extension for PHP activated, even if you have PHP and MySQL installed.
Check that this line is uncommented in your php.ini file (by default : xampp\php\php.ini)
extension=php_mysql.dll
(Reload XAMPP if necessary)

Cannot install Microsoft SQL driver for PHP 5.6 on Windows

I have been trying all day long and nothing. No sqlsrv extension, no logs, nothing. The sqlsrv_connect() function is not defined and I don't see the extension in phpinfo(). I tried WAMP at first. It didn't work. Now I am doing it bit by bit.
I have Windows 10
I installed SQL Express 2005 (is what I need for RMS).
I installed Apache 2.4.16 (x86) in C:\Apache\apache24 from here
I installed PHP 5.6.12 TS (x86) in C:\PHP\php5_6_12 from here
Configured Apache to load php5apache2_4.dll (and changed several other settings so it can run PHP files)
I downloaded Microsoft Drivers for PHP for SQL Server (file SQLSRV32.EXE) from here
I extracted php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll to the ext folder of PHP
Set up extension_dir like extension_dir = "ext"
Added the extensions to php.ini
I start Apache (httpd.exe), see no errors (neither inside the error.log file)
Now, when I open the file that outputs phpinfo() I don't see the extension anywhere. The sqlsrv_connect() is undefined.
I don't see where the PHP related errors are saved (maybe is not configured yet) and I am just stuck after trying thousands of solutions. Can't believe how hard is this in our century. PHP is really old but I really need to have this working.
print phpinfo() and and find sqlsrv. if you'r not able to find in phpinfo()
then, go to wamp and enable the extension my be you have not enable the extension , same issue happens with me so.. pls check
if you are using wamp with 64bit than you need to use unofficial Microsoft SQL Server Driver for PHP (sqlsrv)

OCI8 php extension installation on windows server

I have specific problem with making OCI8 work on my server installation.
First setup:
Win 2008 Server 32bit
ZendServer for PHP with Apache2.2
PHP version 5.3.14 which was without php_oci8 files
No oracle things installed
I need to be able to connect to remote oracle database, so I find out, that OCI8 extension should be used. To make OCI8 work, I also should need at least Oracle Instant Client on server, because of certain DLL OCI8 need.
What I did?
downloaded Oracle Instant Client from their sites ( oracle download site ), version 11.2.0.4.0
unpacked into folder, I choosed Program Files/oci_11_2
added to windows variable path the address
restarted Win
downloaded php_oci8 libraries from PECL ( PECL oci8 dl site )
put them into the ext directory set in php.ini
added extension=php_oci8.dll into php.ini
restarted apache
After all this I checked php_info to see, if everything is ok, however no signs of oci8.
I tried older Oracle instant client, swtiching between php_oci8.dll, php_oci8_11g.dll or php_oci8_12c.dll, yet nothing helped.
I found, that due to php_info in environment section doesn't show the same values, as one that are set in windows.
From php error log I also got following:
[30-May-2014 08:02:16 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\Zend\ZendServer\lib\phpext\php_oci8_11g.dll' - The specified module could not be found.
in Unknown on line 0
Currently, I have no idea what to do, unless trying reinstalling php(which I don't want to because of many problematics connected with that), different Oracle instant clients or differenct php_oci8 libraries. I google for some hours, tried looking on Stack, but no solution, just some tips, that didn't help. Have someone encountered and solved something similar?
I have Same Issue, Following steps helped me out.
Download instantclient and place "C:\instantclient_11_2"
Set environment variable for C:\instantclient_11_2
Check your php version i.e. PHP Version 5.6.15
Form http://pecl.php.net/package/oci8 download exact version, for me its php_oci8-2.0.8-5.6-nts-vc11-x86.zip, unzip it and copy
php_oci8_11g.dll to php ext folder, for me its "C:\xampp\php\ext"
Un-Comment "extension=php_oci8_11g.dll" in php.ini and restart apache
check php_info(), oci8 should be enabled.
Thats all.

How to fix sqlsrv in info.php?

I am using
Ultimate goal: To install wordpress in IIS with MSSQL as DB backend (sqlsrvmethod)
Primary Objective: info.php doesn't shows, "slqsrv".
So trying to install that extension or directive into php. Configuration as below,
Web server - IIS,
mssql driver 3.0,
sqlsrv NOT PDO,
PHP version 5.4.3 (PHP-CGI.exe is being used from D: loaded which is present in wamp/bin/php/php.5.4.3. Since couldn't get any php-cgi.exe along with php file from php.net)
MSSQL 2008
Thread Safety - Enabled, can't able to download php_sqlsrv_54_nts.dll or php_pdo_sqlsrv_54_nts.dll.
Ended up with below, PHP Warning: PHP Startup: Unable to load dynamic library 'D:\wamp\bin\php\php5.4.3\ext\php_sqlsrv_53_ts.dll' - The specified module could not be found.
The php must be installed in the default location of C: drive. Then point it in IIS using PHP manager.
The SQLSRV.v.3.0 must be installed in default location C:
These helped me to resolve the issue easier.
First you must have:
extension=php_sqlsrv_54_ts.dll
extension=php_pdo_sqlsrv_54_ts.dll
in your php.ini file, and both above mentioned drivers must be in "ext" folder of php and you must restart your apache or iis server, then it should show as you expected.....

Categories