Access to the requested object is only available from the local network phpmyadmin

Viewed 194243

I just installed xampp 1.8.0 for linux and when I opened phpmyadmin I got this error Access Forbidden!!

New XAMPP security concept:

Access to the requested object is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

I tried this post but with no luck. please help. I am opening it from my own PC not from any other network.

11 Answers

on osx log into your terminal and execute

sudo nano /opt/lampp/etc/extra/httpd-xampp.conf

and replace

<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Require local
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

with this

<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

and then restart apache and mysql

or use this command

 /opt/lampp/xampp restart

The solution above are right but the challenge has been locating the particular file.

visit for mac https://www.youtube.com/watch?v=OVGCXYZ-BoI

visit for windows https://www.youtube.com/watch?v=MvYyEPaNNhE

INSTRUCTION (If not interested in video)

MAC

Steps

  1. Start your xampp application
  2. Start services

enter image description here

  1. Click on the Volumes menu
  2. Click mount
  3. Click Explore

enter image description here

N.B It opens the opt/lampp/ window enter image description here

  1. Open the following directory to locate file lamp/etc/extra/httpd-xampp-conf
  2. Open the file with any IDE of your choice e.g Visual Studio or PhpStorm or Text-Editor
  3. Locate below code and replace the Require local with Require all granted.

Alias /phpmyadmin "D:/server/phpMyAdmin/" <Directory "D:/server/phpMyAdmin"> AllowOverride AuthConfig Require local ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory>

  1. Ensure you restart all services

  2. Reload your page and Whuala.....It works

I newer version of xampp you may use another method first open your httpd-xampp.conf file and find the string "phpmyadmin" using ctrl+F command (Windows). and then replace this code

Alias /phpmyadmin "D:/server/phpMyAdmin/"
<Directory "D:/server/phpMyAdmin">
    AllowOverride AuthConfig
    Require local
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

with this

Alias /phpmyadmin "D:/server/phpMyAdmin/"
<Directory "D:/server/phpMyAdmin">
    AllowOverride AuthConfig
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

Don't Forget to Restart your Xampp.

Not need to change all config in file /opt/lampp/etc/extra/httpd-xampp.conf. The only thing you need to change is the Require local It's kinda obvious what Require local means so just change to Require all granted Require all granted

Solution

from Require local to Require all granted

Related