PHP error on install of V2.6

PHP error on install of V2.6

by Les Berks -
Number of replies: 5

Hi there

Am working my way through the step-by-step installation for Moodle 2.6 on Ubuntu Server 12.04 LTS  from Moodledocs and have hit a problem.

When I start the install of moodle from the web b rowser, I get the following 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

As anyone else seen this issue before?

Best regards

Les

Average of ratings: -
In reply to Les Berks

Re: PHP error on install of V2.6

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Les,
as the message says, you need to edit PHP's main settings file, php.ini, and enable the "mysqli" extension.

It seems several people have seen this message before. I discovered this with a Google search for "moodle php mysqli". It brought up several similar threads on the Moodle forums.

For example, this one looks useful for you:

Please have look at that thread, and others listed in the Google search. If you need further clarification, please post again.

regards
Gordon

In reply to Gordon Bateson

Re: PHP error on install of V2.6

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes, that's the problem but only the solution if the OS is Windows.

On Linux/Unix you need to recompile PHP with the mysqli extension or, more likely, load it from your system's package manager. For example (Ubuntu, Debian etc)...

sudo apt-get install php5-mysql
sudo service apache2 restart

 

 

Average of ratings: Useful (3)
In reply to Howard Miller

Re: PHP error on install of V2.6

by Les Berks -

Thanks for your help Howard... that cleared that error.

 

 

In reply to Les Berks

Re: PHP error on install of V2.6

by Bill McNutt -

I am installing Moodle 2.6 on a windows 2008 server running IIS 7.  I already have two working moodle servers on this box, but they are Moodle 2.5.1+ (Build: 20130830)Version 2013051401.12.  This is my first installation with 2.6. 

I am running PHP 5.3.8.

I am getting the:

Error: database driver problem detected

The site administrator should verify server configuration

Microsoft Drivers for SQL Server for PHP are not installed or not configured properly.

I don't see how my SQL drivers can be "not installed" or "not configured" if they already work for two other instances.

 

Can anyone offer me any insight?

In reply to Bill McNutt

Re: PHP error on install of V2.6

by Bill McNutt -

Problem solved. The updated PHP didn't support my antiquated drivers. I had to change the dbtype in config.php from 'mssql_n' to 'sqlsrv';