MySQLi config php.ini on CentOS 7 - Moodle installation - php

I am trying to install Moodle 3.0 on my CentOS 7 server, I got the error message:
"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".
Opened the php.ini file but not sure exactly what line to change/uncomment. I know on Windows machines the line extension=php_mysqli.dll should be uncommented to fix this. Any help will be appreciated

Related

Moodle Error: database driver problem detected

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

Unable to configure xampp for oracle 11

I am trying to configure XAMPP for Oracle 11 on my Windows 7 PC.
I followed these steps:
In my php.ini file I uncommented this line: extension=php_oci8_11g.dll
I made sure that dll is in this location: extension_dir="C:\xampp\php\ext"
I restarted my apache and received the following errors (as pop-ups):
The program can’t start because OCI.dll is missing from your computer.
Try reinstalling the program to fix this problem.
Followed by:
PHP Startup: Unable to load dynamic library
‘C:\xampp\php\ext\php_oci8_11g.dll’ – the specified module is not
found.
But I have checked that the file exists in: C:\xampp\php\ext\
So, any idea what the problem is?

Fatal error: Call to undefined function sqlsrv_connect() using wamp php 5.5.12

I am trying to connect to a Azure data base. I have read many other stack overflow answers but they did not work for me:
-I have downloaded all the drivers that Azure offers to you. They are in
C:\wamp\bin\php\php5.5.12\ext folder:
-I have added to the system variable the path to extensions folder.
-I have set the extension in both php.ini files (inside the apache and php folders).
-Extensions have been set like
extension=php_sqlsrv_5X_ts.dll
extension=php_pdo_sqlsrv_5X_ts.dll and like extension=C:/wamp/bin/php/php5.5.12/ext/php_sqlsrv_5X_ts.dll extension=C:/wamp/bin/php/php5.5.12/ext/php_pdo_5X_ts.dll
Where X means that I have tried 53, 54, 55 and 56.
-I restart all wamp services every single time that I try new changes.
-I have even tried with IISExpress.
-It is still giving me this error and I can't see "sqlsvr" when I use phpinfo().
what more I should do? I have been suffering this for weeks.
I use this XAMPP with PHP 5.5.34 at https://www.apachefriends.org/download.html to have the test to enable the sqlsrv extension of PHP.
You can refer my steps:
After install the XAMPP application, run xampp-control.exe, click config=>PHP(php.ini) to check the extension folder.
Download the MSSQL driver for PHP in 3.2 version from https://msdn.microsoft.com/en-us/library/cc296170%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396. Uncompress it.
Copy php_pdo_sqlsrv_55_ts.dll and php_sqlsrv_55_ts.dll from the uncompressed driver folder to the PHP extension folder (X:\xampp\php\ext in my scenario).
Add extension=php_pdo_sqlsrv_55_ts.dll and extension=php_sqlsrv_55_ts.dll in PHP.ini file.
Start Apache.
Meanwhile, you can use phpinfo() to check the setting of Loaded Configuration File and extension_dir to make sure whether you have configured the correct settings in the definite files and the DLL files in the right folder.
I refer to the practice of Jordi's message in this post: Fatal error:
Call to undefined function sqlsrv_connect() in C:\xampp\htdocs
xampp3.2.1 + php 5.5 + sql server 2014 Express, x64.
My situation is, transplant xampp folder to a brand new computer.
Done all things need to do. (Download SQLSRV 5.6 (or 5.3 or..), check php.ini path, ...)
Download and install OBDC Driver 13(x64) (or maybe you can try OBDC Driver 11(x64))
Download and install SQL Server® 2014 Service Pack 3 (x64), need to restart the computer.
Download and install Visual C++ Redistributable VS2012 Update4 (x86)
Restart Apache
Then it can work!!!!!
I have been searching for a solution to this problem for several days and hope to help more people.

Followed instructions on php.net and still cannot get mysqli extension to work

I uncommented this line in the php.ini file: extension=php_mysqli.dll
and my extension is "extension_dir = "ext"".
The php_mysqli.dll does exist in the ext folder.
I am using php 5.5+ so I should not have to manually set the path for libmysql.dll.
Running mysqli_connect yields a fatal error.
I do not understand why this does not work. When I did this with my php_sqlsrv_55_ts.dll file, I was able to connect to sql server immediately. I do not see anything I missed in these installation instructions:
http://www.php.net//manual/en/mysqli.installation.php
Where do I go from here?
Windows 7
apache 2.4
php 5.5.9
No instance of mysql in this machine.

How to configure enable php_pdo_mysql on php5.5.12 and Apache 2.4

After uninstalled IIS from the server, I installed Apache 2.4 64-bit on Windows Server 2008 R2. Additionally, I installed PHP 5.5.12 64-bit.
I followed the instructions on this this "How install Apache 2.4 and PHP"
Everything seems to be fine. But What I am having difficulty with is enabling the php_pdo_mysql. I uncommented both lines in the php.ini file located on c:/php/php.ini
extension=php_mysql.dll
extension=php_mysqli.dll
Then I rebooted the Apache server "for the services list" but the pdo_mysql extension is not loading it as it should.
here are some snapshots from my php info
More, this is the output on the
shell>php -m
here are the files from my server
What else do I need to do to enable pdo_mysql?
What else can I check for?
Thank you
I figure out the problem.
I need to add the following to windows environment variables
;c:\php;c:\apache24;c:\apache24\bin;
After that rebooted Apache and it worked with no issues.
You must load the PDO dll, not the default mysql extensions.
Add the following two lines to your configuration:
extension=php_pdo.dll
extension=php_pdo_mysql.dll
These lines load the PDO extensions. Your lines load the MySQL and MySQLi extension.

Categories