admin管理员组

文章数量:1344509

I've installed phpMyAdmin and PHP, but can't get the login screen to come up when I go to localhost/phpmyadmin. I get a 404 error.

I installed PHP and phpMyAdmin via brew and that Apache, PHP are running.

I signed PHP via this guide.

I used this to get apache working.

Versions: macOS 15.4 phpMyAdmin - 5.2.2 PHP - 8.4.5 Apache - 2.4.62

I did this per the installation instructions for phpMyAdmin:

To enable phpMyAdmin in Apache, add the following to httpd.conf and
restart Apache:
    Alias /phpmyadmin /usr/local/share/phpmyadmin
    <Directory /usr/local/share/phpmyadmin/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        <IfModule mod_authz_core.c>
            Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
            Order allow,deny
            Allow from all
        </IfModule>
    </Directory>

I've installed phpMyAdmin and PHP, but can't get the login screen to come up when I go to localhost/phpmyadmin. I get a 404 error.

I installed PHP and phpMyAdmin via brew and that Apache, PHP are running.

I signed PHP via this guide.

I used this to get apache working.

Versions: macOS 15.4 phpMyAdmin - 5.2.2 PHP - 8.4.5 Apache - 2.4.62

I did this per the installation instructions for phpMyAdmin:

To enable phpMyAdmin in Apache, add the following to httpd.conf and
restart Apache:
    Alias /phpmyadmin /usr/local/share/phpmyadmin
    <Directory /usr/local/share/phpmyadmin/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        <IfModule mod_authz_core.c>
            Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
            Order allow,deny
            Allow from all
        </IfModule>
    </Directory>

I also did this upon installing PHP per the installation:

To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

I was getting the index page of phpMyAdmin until I inserted the " DirectoryIndex index.php index.html " statement from directly above.

Going to localhost says "It works" like it is supposed to.

I'm sure it's probably something dumb, but I am now at a loss to what I am doing wrong.

Share Improve this question asked yesterday cowcardscowcards 213 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

First of all did you check if the phpmyadmin installation really is at /usr/local/share/phpmyadmin

If that's the case and it still don't works you can try to install a copy of phpmyadmin directly in the webroot directory. You can do this as follows:

  1. cd into your webroot (For apache on linux it's /var/www/html per default)

  2. make a new directory called "phpmyadmin" and cd into it.

    mkdir ./phpmyadmin
    
    cd ./phpmyadmin
    
  3. Download the latest Version of phpmyadmin.

    curl -O https://files.phpmyadmin/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.zip
    
  4. Unzip the file

    unzip phpMyAdmin-5.2.2-all-languages.zip
    
  5. unzip creates a directory where all the files are contained in. To use it with "/phpmyadmin" we have to move them into the directory.

    mv ./phpMyAdmin-5.2.2-all-languages/* ./
    
  6. Now we can delete the old phpmyadmin directory and the zip file (Be careful using rm -rf)

    rm -rf ./phpMyAdmin-5.2.2-all-languages
    
    rm -rf ./phpMyAdmin-5.2.2-all-languages.zip
    

Now if you're webserver is running and you go to http://localhost/phpmyadmin the admin panel should show up.

本文标签: phpI am getting a 404 error when browsing to localhostphpmyadmin on macOSStack Overflow