Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/How to fix “you don't have permission to access /phpmyadmin/ on this server”
Next
Answered
Stanley Murphy
  • 29
Stanley Murphy
Asked: May 18, 20222022-05-18T20:39:40+00:00 2022-05-18T20:39:40+00:00In: php

How to fix “you don’t have permission to access /phpmyadmin/ on this server”

  • 29

. Advertisement .

..3..

. Advertisement .

..4..

I am trying to write a php that returns an invalid answer. I don’t know where the incorrect command is in the “you don’t have permission to access /phpmyadmin/ on this server..” My detail is:

# phpMyAdmin - Web based MySQL browser written in php
 # 
 # Allows only localhost by default
 #
 # But allowing phpMyAdmin to anyone other than localhost should be considered
 # dangerous unless properly secured by SSL
 
 Alias /phpMyAdmin /usr/share/phpMyAdmin
 Alias /phpmyadmin /usr/share/phpMyAdmin
 
 
 <Directory /usr/share/phpMyAdmin/>
  <IfModule mod_authz_core.c>
  # Apache 2.4
  <RequireAny>
  Require ip 127.0.0.1
  Require ip ::1
  </RequireAny>
  </IfModule>
  <IfModule !mod_authz_core.c>
  # Apache 2.2
  Order Deny,Allow
  Deny from All
  Allow from 127.0.0.1
  Allow from ::1
  </IfModule>
 </Directory>
 
 <Directory /usr/share/phpMyAdmin/setup/>
  <IfModule mod_authz_core.c>
  # Apache 2.4
  <RequireAny>
  Require ip 127.0.0.1
  Require ip ::1
  </RequireAny>
  </IfModule>
  <IfModule !mod_authz_core.c>
  # Apache 2.2
  Order Deny,Allow
  Deny from All
  Allow from 127.0.0.1
  Allow from ::1
  </IfModule>
 </Directory>
 
 # These directories do not require access over HTTP - taken from the original
 # phpMyAdmin upstream tarball
 #
 <Directory /usr/share/phpMyAdmin/libraries/>
  Order Deny,Allow
  Deny from All
  Allow from None
 </Directory>
 
 <Directory /usr/share/phpMyAdmin/setup/lib/>
  Order Deny,Allow
  Deny from All
  Allow from None
 </Directory>
 
 <Directory /usr/share/phpMyAdmin/setup/frames/>
  Order Deny,Allow
  Deny from All
  Allow from None
 </Directory>
 
 # This configuration prevents mod_security at phpMyAdmin directories from
 # filtering SQL etc. This may break your mod_security implementation.
 #
 #<IfModule mod_security.c>
 # <Directory /usr/share/phpMyAdmin/>
 # SecRuleInheritance Off
 # </Directory>
 #</IfModule>

and I end up with the warning message:

Forbidden
You don't have permission to access `phpmyadmin` on this server

Pls, suggest the best answer to fix it.

don't have permission to access phpmyadmin
  • 2 2 Answers
  • 959 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    hdtutoria Expert
    2022-06-21T05:59:32+00:00Added an answer on June 21, 2022 at 5:59 am

    The cause: I think the problem is in your IP address.

    Solution: You can fix this error by these folfowing steps:

    Change

    Require ip 127.0.0.1

    into:

    Require ip 10.1.3.53

    Again change

    Allow from 127.0.0.1

    into:

    Allow from 10.1.3.53

    Also find deny from all and comment it in the entire file.

    Save and close the file.Restart Apache httpd server:

    # service httpd restart
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Tiago Poisson
    2022-05-25T21:07:44+00:00Added an answer on May 25, 2022 at 9:07 pm

    I could not use any of the above configurations on CentOS 7, server. This is what I found after hours of searching:

    Edit file phpMyAdmin.conf

    sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

    Replace the <Directory> ... </Directory> node by the following:

    <Directory /usr/share/phpMyAdmin/>
     AddDefaultCharset UTF-8
    
     <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
     #Require ip 127.0.0.1
     #Require ip ::1
     Require all granted
     </RequireAny>
     </IfModule>
     <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
     </IfModule>
    </Directory>
    • 11
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.