# phpmyadmin problems

## zeveck

I am having trouble getting PHPMyAdmin to work.

I installed Apache, PHP, MySQL, and PHPMyAdmin.

I ran the scrip that came with PMA to create the appropriate tables and privileges in MySQL.

I can access http://192.168.12.101 and see the default apache page.

I get a login/password prompt when I goto http://192.168.12.101/phpmyadmin.

However, when I actually enter a login/password and hit "Login" I get:

 *Quote:*   

> The connection was refused when attempting to contact localhost.

 

I am logging in from a different machine (192.168.12.2) through Firefox 1.0.7.

I am running PHPMyAdmin 2.6.4.

Any ideas on how to troubleshoot this?

----------

## meathoz

what happens if you try to view the page from the same machine your running it on.

if you got no X on it, you can always try links2...

----------

## zeveck

Hmmm...well at least that is more informative...

 *Quote:*   

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

 

However, I cannot find any reason why pma should have access. There appears to be an appropriate entry in mysql.user.

----------

## zeveck

So, I changed the pma password and now it works from localhost. Not sure WHY that should help, but it did.

Alas, it still doesn't work from a remote machine.

Though I noted that when I put in the login/password in IE it tries to go to:

 *Quote:*   

> http://localhost//phpmyadmin/index.php

 

----------

## c4

 *zeveck wrote:*   

> So, I changed the pma password and now it works from localhost. Not sure WHY that should help, but it did.
> 
> Alas, it still doesn't work from a remote machine.
> 
> Though I noted that when I put in the login/password in IE it tries to go to:
> ...

 

Have you checked that the PmaAbsoluteUri is correct? see what value you have in 

```
/var/www/localhost/htdocs/phpmyadmin/config.inc.php
```

 and check that the path to which you access your phpmyadmin directory matches the path to whatever is set in this configurations file. I'm pretty sure that it's localhost as default, so you will need to change that path to something else like;

```
$cfg['PmaAbsoluteUri'] = 'http://my_server_name.com/phpmyadmin';
```

----------

## zeveck

I tried that, but it didn't help. I also tried leaving that setting blank, which also didn't help.

Oddly, when I try logging in from another Gentoo box I still get error #1045 even though I can manually log PMA into MySQL fine on localhost and http://localhost/phpmyadmin works correctly from the machine phpmyadmin is actually setup on.

Since it works locally I suppose I could setup an SSH tunnel...but...erm...yeah. 

That shouldn't be necessary, right?

 :Sad: 

----------

## zeveck

I'm retarded.

I was making changes on 192.168.12.105 and testing against 192.168.12.101. The latter machine is a clone of the former, so everything looked and felt the same.

So...some step in there fixed it. ^_^ Thanx for all the help.

 :Embarassed: 

----------

## wsmc884

I wish I could get that far. Here's what I get:

Fatal error: Call to undefined function preg_match() in /var/www/phpmyadmin/libraries/defines.lib.php on line 36

I'm not sure I have the virtual hosts setup right. Here is my 00_default_vhost.conf file:

NameVirtualHost *:80

#

# VirtualHost example:

# Almost any Apache directive may go into a VirtualHost container.

# The first VirtualHost section is used for requests without a known

# server name.

#

<VirtualHost *:80>

    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/helium/htdocs

    ServerName helium

    ServerAlias helium

#    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log

#    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common

</VirtualHost>

<VirtualHost *:80>

    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/php-syslog-ng

    ServerName phpsyslog

    ServerAlias phpsyslog

#    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log

#    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common

</VirtualHost>

<VirtualHost *:80>

    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/phpmyadmin

    ServerName phpmyadmin

    ServerAlias phpmyadmin

#    ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log

#    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common

</VirtualHost>

#

# The First Virtual Host is also your DEFAULT Virtual Host.

# This means any requests that do not match any other vhosts will

# goto this virtual host.

#

<IfDefine DEFAULT_VHOST>

<VirtualHost *:80>

The rest is just default. I've tried changing the owner on the phpmyadmin directory to be apache:apache which is wasn't.  There really wasn't much documentation on this that was current. I started with php-syslog-ng from the gentoo wiki and couldn't get that working for simular reasons/error messages so I decided to see if another app I want to install would help close the gap but with phpmyadmin having even less documentation it didn't help.

I'm running php5 without 4 or the 4 mod_php installed. I compiled dev-lang/php with the apache2 use flag. Here is the readout:

helium ~ # emerge dev-lang/php -pv

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] dev-lang/php-5.0.5-r1  -adabas -apache +apache2 -bcmath +berkdb -birdstep -bzip2 -calendar -cdb +cgi +cli +crypt -ctype +curl -curlwrappers -db2 +dba -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase -ftp +gd -gd-external +gdbm -gmp -hardenedphp -hyperwave-api -iconv -imap -informix -inifile -interbase -iodbc -ipv6 -java-external +jpeg -kerberos -ldap -libedit -mcve -memlimit -mhash -ming -msql -mssql +mysql +mysqli +ncurses +nls -oci8 -odbc -oracle7 -ovrimos -pcntl -pcre -pdo-external -pear -pfpro +png -posix -postgres -qdbm +readline -recode -sapdb -sasl -session -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct -sysvipc -threads -tidy +tiff -tokenizer +truetype -wddx +xml2 -xmlrpc -xpm -xsl -yaz -zip +zlib 0 kB

Any help would be appreciated. Thanks!

----------

## zeveck

You need to compile php with the pcre (Perl compatible regular expressions) USE flag.

----------

## wsmc884

ok re-compiled with pcre use flag but I get the same error even after clearing the browser cache, using a different browser and trying a different machine.

Any other thoughts please? I really appreciate the help.

Robert

----------

## wsmc884

Ok I got PHP working after a reboot but when I try to login to php-syslog-ng I get "Username and password combination does not exist!".

I can login to phpmyadmin but at the main screen when I click on anything I get: Connection refused when trying it from another workstation. When I try it from the server itself (localhost) I get not found (Documentation.html for example. I check the path and rights and its there rw,r,r

I try the logins with a user that has full access to the mysql system.

Apache is the ower of all the files. I did that a while back when trouble-shooting. Is that not correct?

Thanks,

Robert

----------

## zeveck

I assume you ran the PMA setup script that comes with phpMyAdmin?

----------

## wsmc884

I went through the documentation.html and then edited config.inc.php and ran create_tables_mysql_4_1_2+.sql

I'm running phpmyadmin 2.6.4 pl1 and mysql 4.1.14

----------

