Click to See Complete Forum and Search --> : Accessing http://localhost through Home Network


Dandaweb
01-16-2006, 12:00 PM
hi,

My desktop is running WinXP Pro IIS Web Server. I access that through localhost while using it.

When on my laptop (win xp home), i can use my browser and open http://192.168.1.2/ and see all the websites with no problem.

but, if while on my laptop, i try to use myphpadmin, i see all the links try to open http://localhost/anything which gives me an error. I can't use phpmyadmin. MySQL databases work fine. I just don't have access to phpmyadmin links.

the question: How can i access my Local Web Server from my laptop using http://localhost??

I guess one solution would be to edit phpmyadmin config files, but i prefer to avoid that.

any ideas??

thanks!

Daniel T
01-16-2006, 01:20 PM
Here's a better solution: in config.inc.php (phpmyadmin), look for $cfg['PmaAbsoluteUri'] (line 32 in mine, yours might be different) and give it a blank value:$cfg['PmaAbsoluteUri'] = '';

Dandaweb
01-16-2006, 01:44 PM
:eek: Oh man, beautiful!

thanks! :D

D.

Dandaweb
01-16-2006, 01:49 PM
But,

Now i get this red line on phpMyAdmin home..

The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!

Weird.. i saw on the config file, a comment saying that this line does not need to be specified.

should i care? :confused:

Daniel T
01-16-2006, 04:41 PM
If it's working fine without it set, just ignore the message. But, if you experience problems, you could give it the following value:$cfg['PmaAbsoluteUri'] = 'http://192.168.1.2/phpmyadmin/';(or wherever the phpmyadmin directory is-- just make sure to use the IP of the hosting computer instead of LOCALHOST)

This is not recommended though, since it will not work when you try to access phpmyadmin from a computer outside your network. If it's not giving you problems, just leave it blank ;)

felgall
01-16-2006, 04:54 PM
localhost is supposed to be the web server on the actual computer you are on since its URL is always 127.0.0.1

what I did instead for my local network was to update the hosts file to assign a domain name (eg. local.home) to the ip address of the computer running the web server.