Installed PHP 5.6 and now I can launch my site.

Installed PHP 5.6 and now I can launch my site.

by Praveena Jogi -
Number of replies: 6

Installed PHP 5.6 and now I can launch my site. Any help appreciated!

Error message:


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.





Average of ratings: -
In reply to Praveena Jogi

Re: Installed PHP 5.6 and now I can launch my site.

by ryan sanders -

server OS (operating system) are you running and what version of it?  along with what version of mysql are you running? 

i do not know how to answer question, but those coming around to help most likely will need to know above.  so to give correct commands to include the mysqli extension. within php5.6

In reply to Praveena Jogi

Re: Installed PHP 5.6 and now I can launch my site.

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Praveena

The error message clearly says, the PHP module for connecting to MySQL is either not there or not configured. For example, in a recent Debian based distribution this would be php5-mysql ('apt-get install php5-mysql').

Why the message mentions PHP 4 at the end is a mystery. Get https://docs.moodle.org/en/PHP#Displaying_phpinfo_outside_of_Moodle and go through the result.
Average of ratings: Useful (2)
In reply to Visvanath Ratnaweera

Re: Installed PHP 5.6 and now I can launch my site.

by Praveena Jogi -

No package php5-mysql available.

In reply to Praveena Jogi

Re: Installed PHP 5.6 and now I can launch my site.

by Ken Task -
Picture of Particularly helpful Moodlers

Don't host with Amazon, so the following is an attempt to assist (do run CentOS servers).

Please see:

https://docs.moodle.org/28/en/Installation_Guide_for_Installing_on_Amazon_EC2

on the above page, it has a section that says:

"I used an instance of the Amazon Linux AMI based on Elastic Block Store. Using an instance based on an Elastic Block Store gives you more options for backing up your disks later. The "Amazon Linux AMI" is based on CentOS and is a pared down version of linux with only the bare essentials included, that should be more secure. You can use the yum command to install anything extra necessary on your server."

Since it is based on CentOS and IF what the above author says is true ... 'can use yum to install anything extra necessary', that might be the issue.  One needs to install not only PHP but the extensions needed to run Moodle.

To see what is available for php using yum try:

sudo yum list php-mysql*

You might have to use other repos to acquire the desired extensions ... versions of the extensions must match that of php itself.

To see what repos currently using:

sudo yum repolist

'spirit of sharing', Ken


Average of ratings: Useful (1)