/    Sign up×
Community /Pin to ProfileBookmark

Accessing http://localhost through Home Network

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 [url]http://192.168.1.2/[/url] 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 [url]http://localhost/anything[/url] 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 [url]http://localhost??[/url]

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

any ideas??

thanks!

to post a comment
Full-stack Developer

5 Comments(s)

Copy linkTweet thisAlerts:
@Daniel_TJan 16.2006 — 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:[code=php]$cfg['PmaAbsoluteUri'] = '';[/code]
Copy linkTweet thisAlerts:
@DandawebauthorJan 16.2006 — :eek: Oh man, beautiful!

thanks! ?

D.
Copy linkTweet thisAlerts:
@DandawebauthorJan 16.2006 — But,

Now i get this red line on phpMyAdmin home..

[COLOR=Red][B]The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file![/B][/COLOR]

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

should i care? ?
Copy linkTweet thisAlerts:
@Daniel_TJan 16.2006 — If it's working fine without it set, just ignore the message. But, if you experience problems, you could give it the following value:[code=php]$cfg['PmaAbsoluteUri'] = 'http://192.168.1.2/phpmyadmin/';[/code](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 ?
Copy linkTweet thisAlerts:
@felgallJan 16.2006 — 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.
×

Success!

Help @Dandaweb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...