error during clean Moodle 3.6.2 install

error during clean Moodle 3.6.2 install

by Carl H -
Number of replies: 4

Hi all

Further to watching the following Moodle installation video, I would be very grateful if someone could kindly provide some expert advice/guidance.


More specifically, after creating a brand new Windows 10 Pro installation (for use as a test server) , I subsequently followed the previously referenced Moodle installation video (albeit that I appreciate that the video is associated with an older version of Windows OS, Apache, PHP and MySQL).

Hence, I can confirm that aside from a clean Windows 10 Pro OS (with all current updates installed), I have equally installed the following:

· Apache 2.4.38 (ref: httpd-2.4.38 -o111a-x64-vc14)

· PHP 7.1.26 (ref: php-7.1.26-Win32-VC14-x64)

· MySQL Installer 8.0.15

· Moodle 3.6.x (ref: moodle-latest-36)

Additionally, I can confirm that I have checked that Apache, PHP and the MySQL services all appear to be running ok; and that the php.ini file has also been updated as per the guidance referenced in your video.

Thereafter, I seem to be getting the following error when trying to complete the Moodle installation (which is very confusing, as I have checked and double checked the MySQLi extension, and I can also confirm that I have removed the semi-colon which precedes this extension/note that this extension is no longer commented out)

- 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.

Whilst I have attempted to google the above error, the commonly suggested fixes that I have been able to find, only seem to suggest that I check that the respective ‘extension=php_mysqli.dll’ is active (which it is / or at least seems to be???)

The only other potential issue that I’ve noted (which may or may not be relevant), is that the section in the YouTube video (which occurs around 40mins in), outlines how to update the System Properties > Environment Variables, to include the C:\PHP; string, does not appear to look the same under Windows 10 Pro; and as such, I wonder whether / where my placement of the C:\PHP; string should be placed under Windows 10 Pro, and or whether this string is still required under Windows 10 Pro

Many thanks

Carl


Average of ratings: -
In reply to Carl H

Re: error during clean Moodle 3.6.2 install

by Carl H -
So, after several additional hours of combing the net and various forums, I found the following post that caught me eye.

Anyway, essentially it would appear that Windows had added its own file type suffix (i.e.; the .ini suffix) to my php.ini file - which in turn, meant that my config file was now php.ini.ini... and therefore my php.ini file was not loading correctly, which in turn was giving me the error.... 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

Whilst this update to the filename effectively helped my initial issue, i subsequently received the following error message... 

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'prn_moodle_user'@'localhost' (using password: YES) in /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php on line 79

Thankfully, i would like to acknowledge AL Rachels post for helping to resolve this issue.

Anwyay.... issues are resolved and Moodle 3.6.2 now appears to be working smile




Average of ratings: Useful (1)
In reply to Carl H

Re: error during clean Moodle 3.6.2 install

by Francisco Rodriguez -
Hello Carl, i'm having this same issue on a clean installation, as soon as i change the name of my php.ini file i get this warning:

Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in C:\Apache24\htdocs\moodle\lib\dml\mysqli_native_moodle_database.php on line 79


Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in C:\Apache24\htdocs\moodle\lib\dml\mysqli_native_moodle_database.php on line 79

I do not completely understand what do you mean with this:

Anyway, essentially it would appear that Windows had added its own file type suffix (i.e.; the .ini suffix) to my php.ini file - which in turn, meant that my config file was now php.ini.ini... and therefore my php.ini file was not loading correctly

Can you explain it to me please?

Thank you.

In reply to Francisco Rodriguez

Re: error during clean Moodle 3.6.2 install

by Luis de Vasconcelos -
In Windows Explorer:

  1. Open the View tab.
  2. Click Options then
  3. Click Change folder and search options.
  4. On the View tab make sure that the Hide extensions for known file types is not selected.
That will make sure you can always see ALL file extensions for ALL file types.

Adding that setting to Windows is just the most stupid thing Microsoft ever did! It has no benefits!  wink
In reply to Francisco Rodriguez

Re: error during clean Moodle 3.6.2 install

by Carl H -

Hi Francisco

As a quick follow up to Luis's post, once you can see / view the file extension type (i.e.: after selecting the view extensions check box), you will likely find that you're 'php.ini' file actually has the file name... 'php.ini.ini'.

Consequently, you just need to delete the .ini suffix from the end of this file - i.e.: so the file is now named... 'php.ini'  and hey presto, you should find that this fixes the problem smile

Best of luck