I am trying to connect myphpadmin..
when i use 'localhost' i can connect easily to myphpadmin
but when i replace localhost to my ip address i got an error it says

Forbidden

You don't have permission to access /phpmyadmin/ on this server.

I've already change the privileges but still i got the same error.
could anyone help me?thnks

Dani AI

Generated

As noted by (WampServer 2.0 on Windows 7), a phpMyAdmin session that works at localhost but returns a 403 when using the machine's IP is usually Apache intentionally blocking non‑local requests. 's comment about the document root is useful background, but the specific cause here is the phpMyAdmin Apache alias being limited to local addresses. The fix is to edit that alias and allow the LAN IP (or specific remote IP), then restart Apache.

Typical steps (make a backup first): locate the phpMyAdmin alias file (WAMP default: C:\wamp\alias\phpmyadmin.conf), open it as Administrator and adjust the access rules. Examples:

Apache 2.2 style:

Alias /phpmyadmin "c:/wamp/apps/phpmyadminX.X.X/"

<Directory "c:/wamp/apps/phpmyadminX.X.X/">
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 192.168.1.0/24
</Directory>

Apache 2.4 style:

Alias /phpmyadmin "c:/wamp/apps/phpmyadminX.X.X/"

<Directory "c:/wamp/apps/phpmyadminX.X.X/">
    Require local
    Require ip 192.168.1.0/24
</Directory>

Replace 192.168.1.0/24 (or the single IP) with the actual LAN range or client IP. After editing, restart Apache from the Wamp tray icon. If the 403 persists, inspect C:\wamp\logs\apache_error.log for lines like "client denied by server configuration" and check httpd.conf for any Listen 127.0.0.1:80 entries (which would prevent connections via the LAN IP).

Security note: avoid allowing Allow from all on public interfaces. If remote access is required, prefer allowing only specific IPs, protect the alias with HTTP authentication, or use an SSH tunnel/port forwarding to keep phpMyAdmin bound to localhost.

Recommended Answers

All 6 Replies

localhost is different directory from myphpadmin.

youre localhost dir is public_html,or if you are using ubuntu you can find it in /var/www

i am using windows.how to solve it?

where you install php?
have you create file before?
like test.php,or any?

create <?php info(); ?> save as info.php where you save youre php file
then run
locate this line
DOCUMENT_ROOT /home/mmmm/public_html/
that is youre localhost dir.

actualy the directory where you save youre php files that is youre public_html.
i wrote the above line,so you have some idea how to locate youre public_html and how use the info() of php.

i am using WampServer 2.0...
i cant locate the path..I use windows 7 operating system...

i want to connect to a database but the problem is i cant access phpmyadmin if i use ipaddress...

mysql already install?
phpmyadmin already install?

both of them are already installed..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.