Avatar of sharingsunshine
sharingsunshine
Flag for United States of America asked on

PHP MyAdmin Problem

I am trying to access PHPMyAdmin and I get this in the error logs when ever I try to open it.  This is a new install so it has never worked.

client denied by server configuration: /usr/share/phpMyAdmin/setup/index.php and it is referencing my IP.

This is the permissions that are on phpmyadmin

drwxr-sr-x 10 ec2-user daemon 4096 Apr 28 20:38 phpmyadmin

PHPMyAdmin is located at /var/www/html/phpmyadmin

I need to be able to get this working so please tell me how to fix the problem.

Thanks,

Randal
PHPApache Web ServerLinux

Avatar of undefined
Last Comment
sharingsunshine

8/22/2022 - Mon
Dave Baldwin

What Linux distribution are you using?  And which version of phpMyAdmin are you trying to install?
gheist

Why dont you install RPM package
having phpmyadmin in /phpmyadmin opens you to all sorts of evils of the net
arnold

Check within phpmyadmin for a .htaccess file.

My guess is that the error relates to the database connection configuration.
Look at /var/log/httpd or /var/log/apache2 in access and error log files to see whether they shed light on the issue.

Did you go through phpmyadmin config?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
xterm

As arnold mentioned, there is an htaccess file in your phpmyadmin folder in your web tree, or a <Directory> directive in your httpd.conf referencing that path, and one of them will have a block that looks something like this in it:

<Limit GET>
order deny,allow
deny from all
allow from 127.0.0.1
allow from 10.0.0.1
</Limit>

Open in new window

Be sure that your IP address(es) appear in one of the allow from lines, and if not present add a new line.  BTW, if you have a line that says something like "require valid-user" then you will need to add your username and encrypted password to the file referenced by the AuthUserFile directive in .htaccess
sharingsunshine

ASKER
The linux distribution is Amazon Linux AMI release 2014.03
Kernel \r on an \m - that's what I get when I cat /etc/issue

The PHPMyAdmin is from yum the epel repository -
phpMyAdmin - Readme
===================

Version 4.1.14

I thought having it installed there was wrong so glad you pointed it out.  I am not familiar with an RPM installation.  

This message is from /var/log/httpd/error_logs
client denied by server configuration: /usr/share/phpMyAdmin/setup/index.php and it is referencing my IP.

I don't see a .htaccess in the phpmyadmin folder

Arnold - don't understand this statement - Did you go through phpmyadmin config?

I went through httpd.conf looking for <Limit, allow from and require valid with the search option in nano.  But none of those are to be found in httpd.conf
arnold

The restriction might be in /etc/httpd/conf.d
See if your httpd.conf file has an include directive at the bottom of the file
include /etc/httpd/conf.d/*.conf
If it does look within this conf.d directory.
A file here such as phpmyadmin.conf
grep -il phpmy

Phpmyadmin has a configuration file where the login options and the mysql server/s that it can administer are defined.  Look in index.php and it should point to agile using include directive. This may manifest once you correct the access issues.

Presumably you have a centos/redhat .... See if you have /etc/release*
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
arnold

Note the error reflects the path not in /var/www/html/phpmyadmin but in /usr/share/phpmyadmin

You could copy the phpmyadmin from the share location to the HTML directory as phpmyadmin2 to test.  The links within are relative and will work, but I think manual modification might still be needed.
Dave Baldwin

The new versions of phpMyAdmin that I have manually installed require you to have a writeable directory for the setup procedure after which you are supposed to copy a 'config' file to the main phpMyAdmin directory and make the setup directory un-writeable.  I'm wondering that is what is causing the problem.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
sharingsunshine

ASKER
Thanks everyone for your assistance.  Adding in the allow from didn't do it all until I changed the alias.  Now it can be accessed via http://my_ip/phpmyadmin
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck