# [SOLVED]   PHP and MySQL don't communicate

## rainer

I'm setting up a Gentoo virtual server.

I have installed Apache, PHP and MySQL and it works. I can connect to MySQL through its console interface without problem.

I tried to install PHPmyAdmin - installation is OK but when I call the setup script, I get the message that says

```
Could not load either mysql or mysqli extension, you might not be able to use phpMyAdmin! Check your PHP configuration. 

Autodetected MySQL extension to use: mysql

```

I found this explanation in the MySQL FAQ:

```
1.20 I receive the error "cannot load MySQL extension, please check PHP Configuration".

To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but failed.

Usually, the problem is solved by installing a software package called "PHP-MySQL" or something similar. 
```

But in my php.ini, extension=mysql.so is there, and PHP is emerged with USE="mysql".

What am I missing?Last edited by rainer on Tue Mar 30, 2010 9:49 am; edited 1 time in total

----------

## massimo

Enable for php the mysqli use-flag, rebuild php, restart apache and try to load the web page again.

----------

## malern

Can you post the output of

```
php -r 'phpinfo();'
```

----------

## rainer

@ massimo:

That was it!

Thanks, Rainer

@ malern

Probably not necessary anymore after the steps massimo suggested but anyway: http://dpaste.com/177634/

----------

