MySQLi Error?

MySQLi Error?

by Mike Churchward -
Number of replies: 7
Picture of Core developers Picture of Plugin developers Picture of Testers
Just updated one of the dev sites running on my laptopto the latest HEAD. Now I can't load the site. I get the error:

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.


What's up with that? I'm running PHP 5.2.6, and MySQL 4.1.21.
Average of ratings: -
In reply to Mike Churchward

Re: MySQLi Error?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This will be a problem with the new native (non-adodb) drivers. File a bug assigned to Petr (skodak) and he will fix it quite fast (when he is not asleep).

In the mean time, look in lib/setup.php where it creates a moodle_native_mysqli driver, and change it back to using a moodle_adodb_mysql driver. Actually, lib/setup.php may just call database_connect in some other library that does the new call.
In reply to Tim Hunt

Re: MySQLi Error?

by Lavanya Manne -
Picture of Plugin developers

Hi Tim Hunt,

I want moodle to run on database type mysqli, instead mysql, as mysqli is faster. I want to run mysqli queries in moodle. How could we enable this in moodle ?

In reply to Mike Churchward

Re: MySQLi Error?

by Peter Kupfer -

The bug the other user filed was marked as closed in November, but this error is still ocurring. I have tried other suggestions on this site, but am stumped. Any other ideas. My host is running php. 5.2.9 and MySql 5.0.91.

Thanks,

Peter

In reply to Peter Kupfer

Re: MySQLi Error?

by Ramon Ovelar -
I have MySQL 5.0.91-community and PHP 5.2.11 and identical error. Thanks, Ramón
In reply to Ramon Ovelar

Re: MySQLi Error?

by PANKAJ SONI -

I also have the same error while setting up the moodle site. My host provider is using the MySQL 5.0.91-community and PHP 5.3.5

I tried to setup moodle 2.0.2 via fantastico and also tried the same via softaculious. but, I was not able to resolve the problem. help me how did you manged to get rid of the problem

In reply to Mike Churchward

Re: MySQLi Error?

by Peter Breach -

Hi all,

Spent time at the and of last academic year sandboxing and working out what we needed to do.  Just been given a server (win2k8 R2enterprise). Dutifully folowed the installation guide for PHP (5.4.6) Mysqlx64 (5.5.27) and Moodle (2.3.2)

All went well until the same error.  Uncommented the mysqli and reran but cannot get past this. 

Tried assorted fixes from this and other sites and am thinking the system is now so screwed up I need to start from scratch again. 

How come several years and versions we are getting this in the latest release?

Whats the definitieve fix for this please, in idiot steps as I need to give up my weekend to fix this.

Thanks

Peter