# phpMyAdmin Cannot load mysql extension.



## SeaHag (Feb 15, 2010)

Getting this error when starting phpMyAdmin.


```
Cannot load mysqli extension. Please check your PHP configuration. - Documentation
```

/usr/local/www/phpMyAdmin/config.inc.php:

```
$i = 0;

$i++;

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

$cfg['Servers'][$i]['user']     = 'root';
$cfg['Servers'][$i]['password'] = 'my_password_here';
$cfg['blowfish_secret'] = 'sdf934sdfgHijh98Y';

$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
```

Any ideas what to check?


----------



## SirDice (Feb 15, 2010)

Have a look at /usr/local/etc/php/extensions.ini and see if the mysql module is loaded.


----------



## SeaHag (Feb 15, 2010)

Yes, it is. Here's the contents of that file:


```
extension=session.so
extension=gd.so
extension=mysql.so
extension=ctype.so
extension=pcre.so
extension=simplexml.so
extension=spl.so
extension=filter.so
extension=bz2.so
extension=openssl.so
extension=pdf.so
extension=zlib.so
extension=mcrypt.so
extension=mbstring.so
extension=zip.so
extension=dom.so
extension=hash.so
extension=iconv.so
extension=json.so
extension=mysqli.so
extension=pdo.so
extension=pdo_sqlite.so
extension=posix.so
extension=sqlite.so
extension=tokenizer.so
extension=xml.so
extension=xmlreader.so
extension=xmlwriter.so
```


----------



## SeaHag (Feb 15, 2010)

*Solved*

I ran portmaster php5 and that got it working.


----------



## tripox (Sep 7, 2010)

*Another solution*



			
				SeaHag said:
			
		

> I ran portmaster php5 and that got it working.



*You can do that but I recommend the following procedure:*


Install _php5-session_
put _extension=session.so_ in /usr/local/etc/php/extensions.ini
Restart Apache 
	
	



```
apachectl restart
```


----------

