Ye Htun Z
Ye Htun Z

Reputation: 2107

Accessing Wamp 2.5 phpmyadmin from another PC in a LAN Network

I have access wamp localhost from another pc but
when accessing phpmyadmin from this pc
i can't access like following figure

When Accessing phpmyadmin from another pc

Upvotes: 3

Views: 22228

Answers (4)

Renato
Renato

Reputation: 21

@RiggsFolly Response explain better the overall, but just to expand little more, trying to help mostly on @SagarMahajan question.

Is there anyway to array range of IP address directly or allow all remote IPs e.g. for allowing 192.168.0.101 to 192.168.0.120 – Sagar Mahajan

Allowing every IP address:

If you change it to "Require all granted" the phpMyAdmin access will be allowed to every IP (external IP addresses included).

Allowing a specific IP address:

If you change it to "Require ip 192.168.0.10" only the IP address '192.168.0.10' will be allowed.

Allowing a range of IP addresses:

If you want to allow it only to a range of IP addresses you can set something like "Require ip 192", so it allows to access every IP that starts with 192 in the first part (eg local addresses).

Upvotes: 0

Balu Abraham
Balu Abraham

Reputation: 40

Change to Require all granted

<Directory "c:/wamp64/apps/phpmyadmin4.8.5/">
    Options +Indexes +FollowSymLinks +MultiViews
  AllowOverride all
  <ifDefine APACHE24>
        Require all granted
    </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>

Upvotes: 0

user9060376
user9060376

Reputation: 1

Alias /phpmyadmin "D:/wamp/apps/phpmyadmin4.6.4/"

<Directory "D:/wamp/apps/phpmyadmin4.6.4/">
    Options Indexes FollowSymLinks MultiViews
  AllowOverride all
  <ifDefine APACHE24>
#       Require local
    Require all granted (changes)
    </ifDefine>
    <ifDefine !APACHE24>
        Order Deny,Allow
#Deny from all
    Allow from all
#    Allow from localhost ::1 127.0.0.1
    **Allow from localhost ::0 0.0.0.0** (changes)

    </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>

Upvotes: 0

RiggsFolly
RiggsFolly

Reputation: 94662

On WAMPServer the phpMyAdmin tool is configure so that it cannot be used from any ip other than the one running WAMPServer. Well to be precise the alias is configured so it can only be accessed from the machine running Apache.

This is of course a security measure, to protect beginners from accidentally giving away the crown jewels.

If you want to allow access to phpMyAdmin from other locations such as your lan then you have to amend the phpMyAdmin's alias configuration. You do this by editing the

\wamp\alias\phpmyadmin.conf

file and adding instructions to tell apache that it is allowed to let more ip addresses connect to this alias.

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.1.14/"

# to give access to phpmyadmin from outside 
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#

<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
    Require ip 192.168.10                   <-- add this line
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
      Deny from all
      Allow from localhost ::1 127.0.0.1
      Allow from 192.168.10                 <-- add this line
    </IfDefine>
  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>

Or you can specify specific ip addresses by doing

Require ip 192.168.2.100 192.168.2.101 192.168.2.102
Require ip 192.168.2.103 192.168.2.104 192.168.2.105

Upvotes: 18

Related Questions