3

I am trying to access another PC Localhost on my PC in same LAN using IP address of that PC, and I am use WAMP Server to connect phpmyadmin of another pc.

I am successfully connected to WAMP server(e.g URL http://192.168.1.8/), but if I try to click on phpmyadmin(http://192.168.1.8/phpmyadmin/) then following network error occurred.

Forbidden
You don't have permission to access /phpmyadmin/ on this server. Apache/2.4.9 (Win32) PHP/5.5.12 Server at 192.168.1.8 Port 80"

Please note that I trying to access another PC Localhost not my PC Localhost.

I am tried each and every thing to solve this problem can not solve that problem.

I change httpd.conf file according to required changes

i.e Require local to Require all granted.

I also change in phpmyadmin.conf file

i.e Deny from all to Require all granted

but not improve the problem

Please tell me the solution of that problem.

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
Tushar Patil
  • 41
  • 1
  • 1
  • 6

1 Answers1

2

phpMyAdmin is secured in its Alias definition in WAMPServer by default, to protect the beginner from accidentally giving access to things without understanding the consequences.

So to allow another PC on your internal network to access phpMyAdmin on the server PC you will need to edit \wamp\alias\phpmyadmin.conf

It should look something like this :

Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.6.0/"

<Directory "c:/wamp/apps/phpmyadmin4.6.0/">
    Options Indexes FollowSymLinks MultiViews
  AllowOverride all
  <ifDefine APACHE24>
        Require local
    </ifDefine>
    <ifDefine !APACHE24>
        Order Deny,Allow
        Deny from all
        Allow from localhost ::1 127.0.0.1
    </ifDefine>

# To import big file you can increase values
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

Amend it to this to allow access

Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.6.0/"

<Directory "c:/wamp/apps/phpmyadmin4.6.0/">
    Options Indexes FollowSymLinks MultiViews
  AllowOverride all
  <ifDefine APACHE24>
        Require local
        Require ip 192.168.1                   <-- New Line
    </ifDefine>
    <ifDefine !APACHE24>
        Order Deny,Allow
        Deny from all
        Allow from localhost ::1 127.0.0.1
        Allow from 192.168.1                    <-- New Line
    </ifDefine>

# To import big file you can increase values
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

If you are using Apache 2.4.x you only need the first new line

If you are using Apache 2.2.x you only need the second new line

NOTE: Never use Require all granted or Allow from all unless that is actually what you intend to do i.e. give access to anyone in the universe!

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149