phpmyadmin acces Forbidden You don't have permission to access this resource.

    This might be the laziest post I've ever seen on this site. Can you at least try, @bertrc ?

    I did chmod 775 -R /var/www/html/phpMyAdmin
    but it doesn't work

    vi /etc/httpd/conf.d/phpMyAdmin.conf

    <Directory /usr/share/phpMyAdmin/>
       AddDefaultCharset UTF-8
       Require all granted
    </Directory>
    # 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/>
       AddDefaultCharset UTF-8
       Require all granted
    </Directory>
    
    <Directory /usr/share/phpMyAdmin/setup/>
       Require local
    </Directory>
    
    # These directories do not require access over HTTP - taken from the original
    # phpMyAdmin upstream tarball
    #
    <Directory /usr/share/phpMyAdmin/libraries/>
        Require all denied
    </Directory>
    
    <Directory /usr/share/phpMyAdmin/templates/>
        Require all denied
    </Directory>
    
    <Directory /usr/share/phpMyAdmin/setup/lib/>
        Require all denied
    </Directory>
    
    <Directory /usr/share/phpMyAdmin/setup/frames/>
        Require all denied
    </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>

      Your apache file wants your phpmyadmin files to be in /usr/share/phpMyAdmin, but you seem to be putting the source in /var/www/phpMyAdmin.

      NOTE: linux file systems are case-sensitive. phpMyAdmin is not the same as phpmyadmin.

      Note that if you put your source code in /var/www/phpMyAdmin, you should probably try to access it via http://example.com/phpMyAdmin (note the case in the url).

      If you want to install it in /usr/share/phpMyAdmin, you'll need to make sure that apache is parsing/using that phpMyAdmin.conf file. That path looks like you're using Red Hat or CentOS perhaps. There are lots of how-to documents for installing phpMyAdmin:
      https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-apache-on-a-centos-7-server

        fedora 36
        I have access to this path
        /var/www/html/phpMyAdmin-5.2.0-all-languages/
        when I click index,php download index.php

        it is not working

        <Directory /usr/share/phpMyAdmin/>
           AddDefaultCharset UTF-8
           #Require all granted
           Require ip 127.0.0.1
           Allow from 127.0.0.1
        </Directory>

        it doesn work

        <Directory /usr/share/phpMyAdmin/>
           AddDefaultCharset UTF-8
           #Require all granted
           Require ip 127.0.0.1
           Allow from 127.0.0.1
        </Directory>
        
        
        <Directory /var/www/html/phpMyAdmin-5.2.0-all-languages/index.php>
        Require ip 127.0.0.1
        Allow from 127.0.0.1
        </Directory>

          It sounds like your web server is not configured to process the PHP files using PHP. I'm not sure what the best way is for you to change the configuration. What operating system are you running? What version of apache? Did you bother to install php on this machine?

          fedore 36
          I have php PHP Version 8.1.13
          Server version: Apache/2.4.54 (Fedora Linux)
          Server built: Jun 17 2022 00:00:00
          mysql version | 8.0.31
          I tried to install phpmyadmin in differents way but it is not working

            When you request a PHP file form your web server, does the PHP get processed correctly? Or have you neglected to configure your web server to handle PHP files with PHP? Is Apache configured to run mod_php or php-fpm?

              php is working well the problem is phpMyAdmin

                You said:

                when I click index,php download index.php

                it is not working

                  Write a Reply...