phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: ddunn935 (---.lightspeed.stlsmo.sbcglobal.net)
Date: February 10, 2012 12:34AM

Hello,

I'm new to PHP and using servers so i downloaded the WAMP to get some training and for my programming class. The setup went smooth. PHP test works fine but when i click on the phpMyAdmin link in the localhost homepage i get this error: "You don't have permission to access /phpmyadmin/ on this server.". The same is the case with SQL Buddy and WebGrind. The thing is they all work when i use 127.0.0.1host instead of localhost. My question is why is it only working with the ip address and not localhost? Is there something in my settings that are skewed?

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: shiroamada (---.219.in-addr.arpa.static.tm.net.my)
Date: February 10, 2012 03:50AM

open notepad (Administrator right) with C:\Windows\System32\drivers\etc\hosts

add this
127.0.0.1 localhost

then go to left click your wampserver icon on taskbar, select apache->httpd.conf
make sure your last few lines with these:


Include "c:/wamp/alias/*"


NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot "c:/wamp/www"
</VirtualHost>

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: ddunn935 (---.lightspeed.stlsmo.sbcglobal.net)
Date: February 10, 2012 04:06AM

Hello thanks for the quick response. Ok i went to the hosts file and it already includes entries for 127.0.0.1. This is how it looks:


# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
::1 localhost

127.0.0.1 localhost


Also, if i did have to add an entry, how would i save it since the hosts file has no extension?
And i checked the Apache httpd.conf and it had Include "c:/wamp/alias/*" but not this:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot "c:/wamp/www"
</VirtualHost>

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: shiroamada (---.219.in-addr.arpa.static.tm.net.my)
Date: February 10, 2012 04:29AM

for the hosts file, I use notepad++ to edit it, u just right click the file, the open with notepad++ you should able to edit it.

To test it, you go to "Run", type on CMD, then type "ping localhost", see r u able to get response or not
you should able to get something like this

Pinging YOUR-PC-NAME [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128


and for the httpd.conf, you try to add it and restart your wamp. See what is your feedback. Do let me know smiling smiley

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: ddunn935 (---.lightspeed.stlsmo.sbcglobal.net)
Date: February 10, 2012 06:19AM

Thank you! That is what my ping said and it works perfectly now! I appreciate all the help smiling smiley

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: longboy (182.177.112.---)
Date: February 10, 2012 03:20PM

Shiroamada, I have same problem from many days, I have already followed your reply and checked everything, but its not working at all, I am getting proper reply from pinging localhost but when ever I am writing localhost into web browser its saying 403 Forbidden. Its all working when I am writing 127.0.0.1

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: Palash (---.178.154.144.bol.net.in)
Date: March 07, 2012 08:31AM

Just open c:/wamp/alias/phpmyadmin.conf

change Deny from all to Allow from all and remove Allow from 127.0.0.1

do the same for sqlbuddy.conf and webgrind.conf

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: Reliance (---.red.bezeqint.net)
Date: March 08, 2012 02:10PM

This works! Thanks to Palash.

By the way, localhost disappears completely when I disable my Ethernet card. But that's not so important because I only do that when I'm experimenting with a turned off firewall...

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: longboy (182.177.40.---)
Date: March 08, 2012 02:26PM

I did the same but did not worked at all for me.

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: stevenmartin99 (Moderator)
Date: March 08, 2012 02:29PM

thats not a Solution to change things in wamp

edit your hosts file and remove ::1 localhost

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: longboy (182.177.40.---)
Date: March 08, 2012 02:38PM

Thanks stevenmartin99 its worked for me.

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: pors (---.178.195.18.bol.net.in)
Date: June 12, 2012 03:43PM

Hi stevenmartin99,

I have done all the steps listed above 1 by 1. I am still unable to run wamp. Kindly let me know if there is anything which i m doing wrongly or missing.

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: stevenmartin99 (Moderator)
Date: June 12, 2012 03:47PM

Get team viewer and I'll take a look in about 2 hours time when I am at a pc

Thanks

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: nipun.joshi@gmail.com (---.hsd1.tn.comcast.net)
Date: October 10, 2012 06:45AM

**REMOVED BY MODERATOR**



Edited 1 time(s). Last edit at 10/10/2012 10:43AM by stevenmartin99.

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: October 10, 2012 10:33AM

Palash Wrote:
-------------------------------------------------------
> Just open c:/wamp/alias/phpmyadmin.conf
>
> change Deny from all to Allow from all and remove
> Allow from 127.0.0.1
>
> do the same for sqlbuddy.conf and webgrind.conf


DO NOT DO THIS UNDER ANY CIRCUMSTANCES.

This opens a HUGH ATTACK VECTOR on your machine.

It allows ANYBODY IN THE UNIVERSE to access your phpMyAdmin and therefore ALL YOUR DATABASES.

All an attacker/hacker needs to do is brute force your root account on mysql, and lets face it if you are inexperienced enough to accept this as a solution ..... you probably have not even PUT A PASSWORD ON 'root'.


Please think your answers through before posting them, remember you are helping others with less knowledge than yourself.

Treat others with care!!!!!

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: yecundha (---.europe.hp.net)
Date: April 18, 2013 03:54PM

RiggsFolly Wrote:
-------------------------------------------------------
> Palash Wrote:
> --------------------------------------------------
> -----
> > Just open c:/wamp/alias/phpmyadmin.conf
> >
> > change Deny from all to Allow from all and
> remove
> > Allow from 127.0.0.1
> >
> > do the same for sqlbuddy.conf and webgrind.conf
>
>
> DO NOT DO THIS UNDER ANY CIRCUMSTANCES.
>
> This opens a HUGH ATTACK VECTOR on your machine.
>
> It allows ANYBODY IN THE UNIVERSE to access your
> phpMyAdmin and therefore ALL YOUR DATABASES.
>
> All an attacker/hacker needs to do is brute force
> your root account on mysql, and lets face it if
> you are inexperienced enough to accept this as a
> solution ..... you probably have not even PUT A
> PASSWORD ON 'root'.
>
>
> Please think your answers through before posting
> them, remember you are helping others with less
> knowledge than yourself.
>
> Treat others with care!!!!!

Hi,
Could you explain me why this is an attack vector, I'm a noob in network stuff.

Options: ReplyQuote
Re: phpMyAdmin, SQL Buddy and WebGrind not working with localhost but works with 127.0.0.1
Posted by: RiggsFolly (---.as13285.net)
Date: April 18, 2013 11:30PM

Allow from all
means that any ip address on the internet is allowed access to your phpMyAdmin app i.e. all your databases.

Its not a problem as long as you dont open up your router, but it is easily forgotten about when 2 months down the line you want to show your friends/client what you are doing and you do open up your router.

It takes about 30 minutes for hackers to see an open port 80 on your router and they will try any and all methods to get in, after all you may be a bank, they dont know you are just playing with php.

Options: ReplyQuote


Sorry, only registered users may post in this forum.