Links from localhost dont work properly - wampserver

When i go to localhost (Wampserver index page) and click on one of the project the url goes to 'project-name/' instead of 'localhost/project-name'
Also, some projects open correctly when i directly go to 'localhost/project-name' and some don't (Internal Server Error). Where is the catch?
I have new pc (win 8.1) and I have just installed the newest version of Wampserver.

found a solution,
Open Your Favorite Text Editor.
Open the file located at c:/wamp/www/index.php
Find line that says
$suppress_localhost = true;
Change the line to:
$suppress_localhost = false;
Save the file and refresh localhost and your project links will now work.
Dont forget to +1 me if it works!
Cheers

Related

Redirect page when to try debug

I assigned a project that is already been exists and can not reach it's developer.
My problem is when I hit the debug button on visual studio, project redirect itself to production URL.
I can see http://localhost:55291 url for a second but then redirects to https://test.customer.com url.
What I've been tried so far;
searched entire project (including app config files in .vs folder) for "https://test.customer.com", there is no result!
set a break point on a first line of Application_Start in Global.asax.cs, it's not hit the line!
looked for the prod url in database, no result!
Where should I look for next?
Workaround solution:
I changed the debug port and it worked!
And now I believe the problem is about to my computer but can not be sure.

Unable to get my development server to work

I installed Wampserver (including the 2 Visual C++ service packs). I placed my tutorial files in the c:\wamp\www\ directory.
On the service tray, I'll go to "localhost" & "Your Projects" & I'll try to open an .html document that submits a form to a .php document.
I get a "Server Not Found" error.
Thank you in advance!
It worked for me several years ago. The tutorial files are in an O'Reilly book ("Missing Manual")
WAMP uses Apache. Go to your start menu, and search for WAMP, which should display a WAMP icon in your hidden icons section of your windows task bar. Just click on it, and click start all services, and bam!
Check out this post on SuperUser: https://superuser.com/a/980974

WampServer Green But Not Working

I found a quirk in WampServer that cost me several hours to figure out. I thought I'd share in case anyone else was having the same difficulty:
I updated my MS Visual C++ package, installed the correct version of Wampserver, put my files in the "www" folder, etc. The server was green and running, but my PHP code would not execute.
One thing was my mistake. I thought I could use the browser to access the file, but I learned that you have to go through LocalHost to open the file.
Another was a weird quirk. Watching videos on the internet, I saw others simply go to LocalHost and click on their project in "My Projects" and their webpages came up. For me, I kept getting "File not found". Scrutinizing the address bars in the videos, I realized that when people in the video clicked, the address would read "localhost/test/test.php" (adding the name of the folder and file to the address) but for me, the address would just read "test.php" (without the localhost, etc. at the beginning) Adding it in manually, the webpage finally came up in PHP.
Hopefully this helps someone else. I don't know if I'm doing something wrong, but at least I can find my files!
(Windows 10 / x64)
I also faced this type of error every time I had to type url to run php file or project. Finally, I found it in:
WWW folder in wamp which is there in C drive
In that index.php file there was a problem:
one simple problem was on line number 335 or 338 maybe it will be just http://
make http:// to http://localhost/
Then it worked fine for me.
I had the same issue. My fix was, I disabled my anti virus and then restarted All my wamp services this

How can I make it so my browser never tries to reintpret localhost as www.localhost.com?

I'm working with Firefox, but I'm sure answers for all browsers could be useful. When my browser can't find localhost:8000, it tries www.localhost.com:8000. I don't want it to ever do that because then I have to retype localhost.
Type about:config in the browser bar.
Type browser.fixup.alternate.enabled in the search box that appears.
Right click on the browser.fixup.alternate.enabled that appears in the filtered list below and choose Toggle to set the value to false.
Answering my own quesiton, I found a solution to the problem. You can simply set your hosts file to redirect www.localhost.com to 127.0.0.1. On Mac the hosts file is /etc/hosts. There is a similar file for Windows, and probably Unix/Linux as well. You can add this line to the file:
127.0.0.1 www.localhost.com

working on port 81(wampserver)

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.
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.
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/"> and replace the HREF with your path there.
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.
Added :8080 to all 3 http://localhost uses in wampmanager.tpl. Saved changes. Exited wampserver. Started Wampserver. Came up green. Clicked localhost inside wampserver menu. Wampserver page opened in browser.
Thank you Peter Lang for your post. It led me to solution I've struggled with for several days.

Resources