Error message installing Moodle 2.0

Error message installing Moodle 2.0

by Steven Day -
Number of replies: 21
I'm on shared hosting, which perhaps is part of the problem. Never had issues before upgrading, though past installations were all 1.x upgrades.

Thanks in advance for any help. Warning message is below.


Web server software (WebServerX) is not suported, sorry.

____________

I used the config_dist.php file included in the download of version 2.0 and made the necessary changes based on the original file. Now I get the following warning:

Error: database driver problem detected

The site administrator should verify server configuration

PHP has not been properly configured with the PGSQL extension so that it can communicate with PostgreSQL. Please check your php.ini file or recompile PHP.
Average of ratings: -
In reply to Steven Day

Re: Error message installing Moodle 2.0

by Steven Day -
Please disregard this. I see that Moodle 2.0 requires PHP 5.2.8 and my host is running 5.2.12.

In reply to Steven Day

Re: Error message installing Moodle 2.0

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Right, so that should work. 12 > 8
In reply to Tim Hunt

Re: Error message installing Moodle 2.0

by Steven Day -
Thanks, Tim. Sorry, I believe that should be .1. In any case, I will look into this. Meantime, is there anything that one should be aware of upgrading from 1.9x to 2.0? I did not see any documentation on the 2.0 preview page.
In reply to Steven Day

Re: Error message installing Moodle 2.0

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Not yet, Moodle 2.0 is still in beta- and should not be considered ready for production sites. The idea, I assume, is that the current release give us the opportunity to preview it, to look at some features and test things out in it, well, that is how I have been using it. Documentation will come, as more people use it but so far, personally, I have been tied up on so many other things. I have not had time to prepare anything. It's coming, like Moodle 2.0...
In reply to Colin Fraser

Re: Error message installing Moodle 2.0

by Steven Day -
Thanks, Colin. That all makes sense. I was eager to try to get it running on own site, even after poking around the demo site. But it was not installed for production, just a little sandbox. That said, does anyone know if the installation will have other requirements not yet seen in earlier versions of Moodle?
In reply to Steven Day

Re: Error message installing Moodle 2.0

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Definitely a good idea to try setting up Moodle 2.0 in a sandbox. Moodle should automatically check the requirements it has during install. Also, they should be listed in the release-notes, but they may not be there yet.

Actually, your initial error messages look like they are coming from the self-test stage; and it may be that it is the test that is the problem. I have never heard of WebServerX, but it may just be a rebranded version of Apache. In which case it is quite capable of running Moodle, and the test is just getting in the way.
In reply to Tim Hunt

Re: Error message installing Moodle 2.0

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Well, I just reinstalled Moodle 2.0 standard (WAMP) and without a hitch, but it is into a Windows XP box. Still not happy with Vista, and have yet to impose a version of 7 on anything I have here. The install went as smooth as silk, and was so quick, much faster than it was the first time I tried it. (As yet, I am not allowed to try this on a server... seems no-one wants to lend me their server...big grin - can't understand why..thoughtful.)

I have come to the conclusion that the WAMP is a considerably more stable and much easier install than a XAMPP, but giving up on XAMPP a while ago, this just may be my prejudice.

In reply to Colin Fraser

Re: Error message installing Moodle 2.0

by Steven Day -
Thanks for your replies, Tim and Colin. I suppose I could also try setting it up locally but since the eventual production site will run on shared hosting, I want to get it working there (even though I won't be using it for courses since my school runs its own CMS).

Will contact support at my host, too.

Thanks again.
In reply to Steven Day

Re: Error message installing Moodle 2.0

by Steven Day -
According to my webhosting service, PostgreSQL is not available at all on their servers. So if it is necessary to run Moodle 2.0, I'm out of luck it would seem.

In reply to Steven Day

Re: Error message installing Moodle 2.0

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Moodle 2.0 will work on MySQL, Postgres, MS SQL Server, or Oracle.
In reply to Tim Hunt

Re: Error message installing Moodle 2.0

by Steven Day -
Thanks, Tim. I just saw that on the bottom of the download page. Changed the dbtype in the configuration file from default below to 'mysqli', but still no luck. It should be mysql but perhaps I need to change something else in the configuration file.


$CFG->dbtype = 'pgsql'; // 'pgsql', 'mysqli', 'mssql' or 'oci'


In reply to Steven Day

Re: Error message installing Moodle 2.0

by Sary Huang -

I am having same error MySqli not configure to communicate with MySQL as Steven when I upgrade from Moodle 1.9.9 to 2.0.  I am running Moodle on Window Vista having PHP 5.2.10 and MySQL 5.1.36-Community.  I also tried to change the dbtype='mysqli' and still see same error as below:

Error: database driver problem detected

The site administrator should verify server configuration

PHP has not been properly configured with the MySQLi extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP. MySQLi extension is not available for PHP 4.

I would really appreciate any advice or suggestion.

Thank you in advance.

Sary

In reply to Sary Huang

Re: Error message installing Moodle 2.0

by Jamie Tinley -

I too have the same error. I'm not upgrading but installing from scratch 2.0.

Separate installs of apache, mysql, php.  In config.php I tried

$CFG->dbtype    = 'mysql';      -  I also tried  'mysqli'  no joy

in extensions I added c:PHP5\;c:PHP\

in PHP I uncommented both extensions mysqli and mysql

restarted apache, mysql after each trial.  I did not restart my browser install (http://localhost/moodle/install.php

Why is the screen before this step only give me the choice of mysqli and not mysql?  I read that 2.0 needs mysqli and that it has not been documented yet.

Any advice would be helpful as I'm so close in the stall process finally after finally making apache, PHP, and Mysql to talk to each other.  I included screenshots if this helps.

Attachment Moodle2install 06 Error.png
In reply to Jamie Tinley

Re: Error message installing Moodle 2.0

by Jamie Tinley -

Sorry, I meant to attach not post the picture.

anyway, meant to add more details to my install

I'm on a virtual vmware server 2003 with separate installs as follows

apache (httpd-2.2.17-win32-x86-no_ssl.msi),
mysql (mysql-5.5.8-win32.msi),
php (thread safe php-5.3.4-Win32-VC9-x86).
thanks, I hope someone can help us all here.
In reply to Jamie Tinley

Re: Error message installing Moodle 2.0

by Jamie Tinley -
Useful tip to those with same issue: in config.php I uncommented all lines for debugging after this sentence // Force a debugging. So Now I see these erorrs - can anyone shed light on any of them? It seems that my call to confg.php is not working. php talks to apache fine, but something about connecting to mysql must be missing. I tried to repair apache and myslql with no change. Here's my errors under same error posted above. line 263 of \lib\dml\mysqli_native_moodle_database.php: dml_exception thrown line 279 of \lib\dmllib.php: call to mysqli_native_moodle_database->connect() line 422 of \lib\setup.php: call to setup_DB() line 437 of \config.php: call to require_once() line 4 of \admin\health.php: call to require_once()
In reply to Jamie Tinley

Re: Error message installing Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

MySQLi is only available with PHP 5.3

You need to update your server to PHP 5.3.3 or Moodle 2.1 won't run otherwise. I've just spent a couple of hours updating my localhost WAMP Server, and I had PHP 5.3 but Moodle recommend I use 5.3.3 and the installed stopped.

I downloaded WAMP2 which is Apache PHP 5.3.5 & MySQL 5.5.8for Windows

Mary

 

In reply to Mary Evans

Re: Error message installing Moodle 2.0

by Jamie Tinley -

Thanks Mary,

I am using php 5.3 - mine is version 5.3.4.  Or should I use 5.3.3 because 5.3.4 is too new?

Is this correct to have all three uncommented in php.ini

mysql.php

mysqli.php

mssql.php

also, is it right in config.php for me us use mysqli or mysql? I tried both.   I know apache and php are working as I can create any php file I want and get it to show up inside my moodle folder.  The moment I try any php file that calls config then it fails. See my errors. If I rename config then I can get to the 3rd step of moodle install at which point it fails to log in with my root and password (see screenshot previous post).  I'm going crazy trying to figure it out.  xamp installed easy.  Could that be the problem that I tried xamp first?

thanks

apache (httpd-2.2.17-win32-x86-no_ssl.msi),
mysql (mysql-5.5.8-win32.msi),
php (thread safe php-5.3.4-Win32-VC9-x86).
In reply to Jamie Tinley

Re: Error message installing Moodle 2.0

by Jamie Tinley -

*** solved ***

I'm documenting this for those who have the same issue.  I can see why many people don't document their successes with much detail: After so much hard work and frustration, you want to celebrate to search through all your notes again.  I have 19 pages of notes and 84 useful weblinks of probably 400 I've visited to find them.  And I've installed moodle 2x before with notes equally long.  This will not be one sitting so I will eventually try to combine the best advice into one document.  The LAMP gods are far beyond my intellect and require a lot more than rubbing the LAMP a few times to get the magic wishes.  I'm the blind attempting share the advice I read.  Bottomline for now were these insights:

using http://localhost/info.php  (you create the info.php here) really read it. and compare it to a working copy.  I found my Loaded Configuration File was NONE!  no wonder.  I assumed because info.php brought up a nice looking page that php and apache were friends.  all the changes I made to php.ini were meaningless.  I found out how to change the location for apache to look for php.ini by uncommenting (remove ;) this simple line in apache's httpd.conf file which I had already done at the beginning of install but somehow added back.

PHPiniDIR "C:\php"

I also added a line from my moodle 1.9 httpd.conf file but not sure if needed because I get the message already loaded.

LoadModule php5_module "C:/PHP/php5apache2_2.dll"

It was not my versions that were wrong but that I was not loading anything that I commented out in my php.ini file like mysqli.php  Now that it loaded, boy did I get some errors to load different drivers.  I have a question on that myself but for now, info.php showed my loaded configuration correctly as c:\php and better, mysqli module was loaded! smile

Next I found I had to rename my config.php file in moodle to get the http://localhost/install.php to work.  Not sure why I made all those changes to it if it's not used yet.  Anyway, this is where I am now in the middle of the install with all lights green more or less.  I'll update this later. I hope this helps someone green like me.

In reply to Jamie Tinley

Re: Error message installing Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well Jamie, glad you solved the problem...at least I hope you did!

Every install I have done, Moodle always creates the config.php for me so, how come you had to write your own? I have never quite figure that one out.

When are you publishing your book? smile

Mary

In reply to Sary Huang

Re: Error message installing Moodle 2.0

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Sary,

You need to update your localhost server to PHP 5.3.3 as MySQLi is not available on PHP 4, which is what your server must be using.

Mary

In reply to Mary Evans

Re: Error message installing Moodle 2.0

by Peter Kupfer -

I'm not sure who is in charge of the installation instuctions, but they are very confusing, they state:

"Moodle 2.0 needs PHP v 5.2.8. There have been some issues with deprecated tags in PHP v 5.3.0 which have a negative impact on a number of PHP Apps, Moodle not exempted, so please ensure your PHP version is later than v 5.3.2 if using a v5.3.x. There has also been reported some issues installing Moodle with PHP-Accelerator. See the PHP Moodle version requirements here PHP settings by Moodle version for more information."

But my web host is running 5.2.9 and I am still getting this MySqli issue and I am not sure how to fix it. Does Moodle 2 need 5.3.3 or will 5.2.9 work? If so, how do I get it work if I can't pick MySql as an option since MySql is the only choice I get.

Thanks,

Peter