tags:

views:

446

answers:

4

I have recently installed wampserver 2.0 and configured it to work on port 81. Now the problem is that when I click on phpMyAdmin present at the taskbar inside wampserver 2.0 the browser redirects me to

localhost/phpmyadmin instead of localhost:81/phpmyadmin. When I manually type it, everything works fine.

How can I fix this thing? I want the browser to open localhost:81/phpmyadmin page instead of localhost/phpmyadmin when I click on phpMyAdmin.

A: 

If I'm understanding you correctly, the problem is that your link to phpMyAdmin points to the wrong direction. Now I've never used this server, but the wampserver's taskbar is probably some HTML file. Just look for something like <a href="http://localhost/phpMyAdmin/"&gt; and replace the HREF with your path there.

Joel Alejandro
Not in that case (see my answer)
Peter Lang
A: 

Wherever possible, you should use relative links in your website. I don't know anything about this "wampserver", but the link to phpmyadmin, instead of being <a href="http://localhost/phpmyadmin">, should be <a href="/phpmyadmin">, and that way it will continue to work no matter what port or domain you're running on.

Paul Tomblin
Not in that case (see my answer)
Peter Lang
+4  A: 

The configuration is stored in wampmanager.ini, located in the wamp installation directory.

This file is generated from wampmanager.tpl though, so you need to change the following line there:

Type: item; Caption: "${w_phpmyadmin}"; Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost/phpmyadmin/"; Glyph: 5

You can even add your own menu items in there if you like.

You need to restart Wamp after changing this configuration, since wampmanager.ini needs to be re-generated.

Peter Lang
Yes, but will it allow a relative link like I suggested?
Paul Tomblin
+1, so that's how Wamp deals with it. :)
Joel Alejandro
@Paul Tomblin: There is no need for a relative link in that case. This is the link to open the start-page of `phpMyAdmin` and it is displayed in a non-html menu (http://www.wampserver.com/en/data/image_menu_wamp.gif) which is configured via the described `ini` file.
Peter Lang
Thanks for the correct answer xD.
Kid
If you make it a relative link, you won't have to change it when you decide to move to port 82 or whatever.
Paul Tomblin
@Paul Tomblin: If you make it a relative link it won't work. The browsers executable is called with this link as a parameter. That's like typing `/questions/2123106` into your browser address bar without the preceding `http://stackoverflow.com`.
Peter Lang
A: 

A belated THANK YOU to Peter Lang for this information - it's been driving me crazy for about 6 weeks!

hedera