Moodle installation issue on Windows 7

Moodle installation issue on Windows 7

by Moodle Geek -
Number of replies: 7

I install Apache (2.4), MySQL (5.6) and PHP (5.6) on Windows 7 (seperate components). Running the phpInfo () script shows the mysql/mysqli sections. After I begin the moodle installation, it goes smoothly to the end until moodle asks me to create a user account. After I do so, moodle goes blank. If I visit the URL again, I receive the error "Error: database driver problem detected .... PHP has not been configured properly with the MySQLi extension...". If I check the phpInfo again, I cant see the mysql/mysqli section anymore (strange). I have tried the installation on several Windows 7 machines but the same result.

Am I missing something? Which MySQL/PHP/Apache version may be suitable for Windows 7 installation.

Average of ratings: -
In reply to Moodle Geek

Re: Moodle installation issue on Windows 7

by Usman Asar -
Picture of Plugin developers Picture of Testers

If (usually at the time of creating admin account), screen goes blank, these are signs of corrupted cache, simple solution is deleting the "cache" and "localcache" folders in moodledata directory, and refreshing webpage will take you back to moodle while recreating the two deleted folders automatically.

The removal of mysqli extension is really strange for application server shouldnt overwrite the php.ini file, but anyway, give it a try again and hope for the best.

In reply to Moodle Geek

Re: Moodle installation issue on Windows 7

by Moodle Geek -

@Usman. Did what you said but Moodle comes back with the same error message.

@Gareth. Does the installation order make a difference. Usually my order of installation is apache > php > mysql > moodle.

Interestingly, the same setup works on Windows Server OS but fails on Windows 7. Are you aware of versions specific to Windows 7?

In reply to Moodle Geek

Re: Moodle installation issue on Windows 7

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I don't think installation order matters.  Nothing really happens until you start Moodle from the URL anyway.

I've only ever done this on Win 7.

Look at the error logs for both Apache and PHP.

Interestingly though, I found that the thread safe version of PHP kept crashing, so had to go down the FastCGI / non-thread safe route, e.g. httpd.conf bit with PHP 5.6:

LoadModule fcgid_module modules/mod_fcgid.so  
# Where is your php.ini file?
FcgidInitialEnv PHPRC        "c:/php56" 
FcgidMaxRequestLen 512000000
AddHandler fcgid-script .php  
FcgidWrapper "c:/php56/php-cgi.exe" .php
FcgidInitialEnv PATH "c:/php56;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"
FcgidInitialEnv SystemRoot "C:/Windows" 
FcgidInitialEnv SystemDrive "C:" 
FcgidInitialEnv TEMP "C:/WINDOWS/Temp" 
FcgidInitialEnv TMP "C:/WINDOWS/Temp" 
FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 1200
FcgidConnectTimeout 1200
FcgidBusyScanInterval 1200
FcgidBusyTimeout 1200
FcgidErrorScanInterval 1200
FcgidIdleScanInterval 1200
FcgidIdleTimeout 1200
FcgidProcessLifeTime 3600
FcgidZombieScanInterval 1200

you will need to download the fcgid module as that is an extra, get from the same place as Apache.

In reply to Moodle Geek

Re: Moodle installation issue on Windows 7

by Moodle Geek -

@Usman, I just went through a fresh install and changed the installation order (mysql > apache > php as mentioned at https://docs.moodle.org/30/en/Manual_install_on_Windows_7_with_Apache_and_MySQL). I did come across the blank page at the end. But as you mentioned above, I removed the Cache & LocalCache and it just worked like a charm. In addition, in the php.ini file, I only uncommented extension=c:/php/ext/php_mysqli.dll (and not extension=c:/php/ext/php_mysql.dll).

I am just so glad to see moodle finally working on Windows 7.


@Gareth, I still used the Thread Safe php zip file.

Thanks to both of you...

In reply to Moodle Geek

Re: Moodle installation issue on Windows 7

by Usman Asar -
Picture of Plugin developers Picture of Testers

I am not aware of PHP 5.x, but surely in PHP 7.0 keeping mysql extension creates issues as it doesn't as well comes as part of php.ini file in PHP 7.x

The order of installation doesn't matters, I usually start with Web server, Application server and finally DB server.

For screen going blank, this is absolutely normal and the only solution is deleting cache's - so far I only experienced it on Windows platform with Apache.