# phpmyadmin problem - Call to undefined function: pma_sqp_ise

## sigmalll

I have apache2 running with 2 vhosts. 127.0.0.1 pointing to the default /var/www/localhost/htdocs, and 192.168.0.5 (my lan ip) pointing to a development site.

Installed phpmyadmin (2.5.6_rc1) however when I point a browser to http://127.0.0.1/phpmyadmin i get

```
Server 127.0.0.1

Fatal error: Call to undefined function: pma_sqp_iserror() in /var/www/localhost/htdocs/phpmyadmin/libraries/common.lib.php on line 488

```

A google is quite fruitless, returning a handfull of pages, one of which points to http://www.phpmyadmin.net/cvs/phpMyAdmin-2.5.6-dev/

----------

## UberLord

I get the same error. Time to file a bug report

----------

## UberLord

https://bugs.gentoo.org/show_bug.cgi?id=41449

----------

## sigmalll

Didnt realise it was due to an upgrade (I really must pay more attention to what emerge -puD is doing). I decided to give mysqlcc a whirl and am amazed I hadn't tried it before. hmmm. perhaps I need more coffee.

Nice icon btw  :Smile: 

----------

## UberLord

Here's the fix - don't edit the config file until you've done the ebuild package config thing that the emerge tells you to do.

----------

## mroublic

I'm installing apache 2 and mod_php 4 for the first time on a clean gentoo box and get the same error message.

I thought I did do all of the steps that I saw when I emerged mod_php..

What exactly is the ebuld package config step?  (or tell me which package (php or mod_php or ?) do I need to re emerge to see the instructions again?

Thanks,

-Jim

----------

## UberLord

You could remerge phpmyadmin to see the instructions again.

----------

## sigmalll

or just 

```
cat /usr/portage/dev-db/phpmyadmin/phpmyadmin-2.5.6_rc1.ebuild

```

----------

## cdunham

Let's make it clear what is really going on here.

First, this will happen if the password set up for the phpMyAdmin account is different than what is in /etc/phpmyadmin/config.inc.php . This can happen if you forget to run ebuild ... config (which just runs the SQL script in /etc/phpmyadmin/mysql-setup.sql).

However, this can also happen if for some reason you modified the password for the account somewhere else, or, as in my case, messed up doing the etc-update and accepted a change for the config file, but not the SQL script, in which case no amount of re-running emerge ... config would fix a blasted thing!

The UNDERLYING problem is a bug in phpMyAdmin where the PMA_mysqlDie() function is called before the right libraries are loaded, so PMA_SQP_isError() is not yet defined. I didn't look into it too much, but probably the code tried to connect to the db before including the library for some reason. That's why you get this bizarre error, rather than something useful like "unable to connect to database, is it set up and is the password in the /etc/phpmyadmin/config.inc.php correct?".

Hope this helps someone...

----------

## stevesm

OK, I have this problem too. Could anyone tell me how to safely remove all of the offending programs without bringing my system down so I can start from scratch (I missed the MySQL config on the first go). Also, what would be the best order to emerge PHP, MySQL etc.

Thanks,

Steve

----------

## cdunham

No need to rip everything out, just make sure the passwords match.

You should have two files in /etc/phpmyadmin:

/etc/phpmyadmin/config.inc.php

/etc/phpmyadmin/mysql-setup.sql

It should be clean where the password is in each (its a long string of numbers). Make sure they match.

The run the SQL script:

% mysql -p < /etc/phpmyadmin/mysql-setup.sql

It should work from there.

----------

## stevesm

I've done as per your instructions. Both passwords match, ran the script. Still get the same error. PHP must be working because I can successfully run:

```
<?php phpinfo(); ?>
```

If I call MySQL on the commandline, or even in Webmin, I can get in no problem. I even see the pmadb database in there.

*head bangs against the wall* Any further ideas?

Steve

P.S. I have the /etc/phpmyadmin/config.inc.php set to 'cookie' mode. When I go to http://localhost/phpmyadmin I get a login page.

----------

## cdunham

Can you access mysql using the phpmyadmin username and password?

```
mysql -u pma -p mysql
```

(enter the numeric password from the config files)

----------

## cdunham

Also, what do you have for the value for "connect_type"?

This error comes from a failure for phpmyadmin to connect, but it might come as a result of other very early errors as well...

----------

## stevesm

When I try:

```
mysql -u pma -p mysql
```

 I get:'ERROR 1045: Access denied for user: 'pma@localhost' (Using password: YES)'

When I try:

```
mysql -u root -p mysql
```

 and type the password I gave for root in MySQL it works. 

Do I just need to 'passwd pma'? 

for Connect type, I assume you mean:

```
$cfg['Servers'][$i]['connect_type']    = 'tcp';
```

 which is what I have.

Getting there...   :Smile:  Thanks for your continuing help.

Steve

----------

## cdunham

 *stevesm wrote:*   

> When I try:
> 
> ```
> mysql -u pma -p mysql
> ```
> ...

 

Well, there you go. This is the account that phpmyadmin uses, so either the permissions aren't set right, or the password is wrong.

Unfortunately, it's not as easy as 'password pma', but running the script in /etc/phpmyadmin should have set everything up. Take a look at it and you will see what it's doing...

----------

## stevesm

 *Quote:*   

> the script in /etc/phpmyadmin should have set everything up.

 

Well, the script password matches the one in config.inc.php so I can only assume its a permissions thing. However, I changed the control user in the conf file to root with and without a password and it still gives the original error.

I found another post about a problem accessing phpmyadmin: https://forums.gentoo.org/viewtopic.php?t=60645&postdays=0&postorder=asc&highlight=mysqlsetup+sql&start=25 and the last but one note shows how to remake the mysql database. I think I may try that. I'll let you know.

Thanks,

Steve

----------

## stevesm

Tried that, didn't work. *gah!* however...

I did an emerge -C php and then emerge php thinking it may change something. I read in a different post that MySQL should be emerged before php because of a use flag. Still didn't appear to work until...

I noticed that on the PHPMyadmin login screen that there is two server choices (both localhost). When I set to the second one and login as root, I get in!   :Very Happy: 

OK, so now I can get in. I'd like to know how to set up various users and how to keep one user out of another users db. I expect I'll find it in the MyPHP/MySQL docs.

Thank you cdunham for all your help.

Steve

----------

## Wilhelm

This solves the problem.

```

 * 2. Update MySQL's grant tables and the pmadb database:

 *      ebuild /var/db/pkg/dev-db/phpmyadmin-2.5.6_rc1/phpmyadmin-2.5.6_rc1.ebuild config

```

----------

