WampServer Green But Not Working - wampserver

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

Related

404 anomaly on one computer only

This is weird. On my personal computer at home when I type in my website, I get a 404 error.
No other computer gets the 404 error that I can see from several work computers to relatives, wife's laptop and even my phone using the same WIFI connection.
This only happened after switching my preferred domain under preferred hosting settings from www.xxx.com to xxx.com - perhaps coincidence, perhaps not.
I did this as links in Twitter and Facebook where directing to xxx.com and were giving me 404 errors. Note that the day I made the change the 404 errors went away and I was linking to my website. Then a day later, not working to access my website.
I would suspect nameservers etc but my computer is the only one seemingly exhibiting the problem.
I cleared the browser cache for Chrome and Edge still nothing. I downloaded FireFox and installed fresh and get the same 404 error.
I flushed the dns with ipconfig in administrator mode and it has been over 24 hours since the problem first occurred.
I can get to my website using the IP address fine. I can't using the URL, only on this computer. I even called GoDaddy to make sure it was only my machine and they say they see no problem.
The HOSTS file is virtually empty. and I can use the website with Visual Studio no problem.
Any thoughts? I am stumped on this anomaly.
Thanks again everyone! Your feedback helped me solve the problem. This project was originally started in PHP and moved to from Apache server to ASP.NET. My hosts file still had remnants to xxx.com being local, and not searching outside to the world. Removing 127.0.0.1 xxx.com solved the problem.
THANK YOU!

Can't get to local server in WAMP

When I click localhost in the WAMP menu, the localhost homepage opens as normal. I then click on any of my projects and instead of activating the localhost URL it goes to the server (www) based URL. For instance, one of the projects is 'chrispowell100.co.uk' and I would expect the URL that opens to be localhost/chrispowell100.co.uk but it is actually chrispowell100.co.uk which activates the www version. This has only just started happening in the last few days - prior to that I have used WAMP without issue for several years. I thought at first this may be a W10 problem which is where I first noticed it but I have identical symptoms on W8. (If I type 'localhost/chrispowell100.co.uk' in the address bar, the correct, local version opens.)
Can someone tell me what is happening and how to fix it?
Appreciate any advice!
On looking at the code for WAMP's index.php I came across $suppress_localhost variable. Googling that led me to WAMP - Remove localhost from project URL which answers my question. Case closed.

localhost.com redirects to google search

I am eager to know why localhost.com (without www) redirects to google.com. I also noticed that www.localhost.com gives a 404 page not found. I checked this in Firefox, Chrome and Internet Explorer all does the same. I checked the domain name records and it shows it belongs to Tucows and I am pretty sure Google doesn't own it and I know we can use http redirect to change it to a www or non-www version as the site owner wishes.
Interesting answer posted by Ken Watford, Google employee: http://www.quora.com/Why-does-http-localhost-com-redirect-to-Google
He claims someone bought the domain when the web was still young and kept it ever since, but he does not say who.
It looks like others have had the results as you, check out the links below.
Try here:
http://answers.yahoo.com/question/index?qid=20111105050333AATP1r5
or here:
http://forums.phpfreaks.com/topic/146474-localhost-redirects-to-googlecom/
I think localhost.com should be owned by google as I tried pinging it and it showed the ip of google.com.I still don't know why the DNS records shows tucows as the owner.
I have been searching this from long and finally i found complete solution after going through different answers.
As far as #pradeep's answer is concern, he is right that localhost.com is purchased and points to particular IP so it is redirecting.
But we can override domain names in Windows platform for our local development PC via hosts file residing in C:\Windows\System32\drivers\etc as per #Faysal's answer.
Open hosts file as administrator and enter following line
127.0.0.1 localhost.com
But doing such also did not solve my problem. So i found final solution which will work in chrome browser.
In chrome you have to clear all dns cache via opening following url
chrome://net-internals/#dns
And here clear all cache and finally you will be redirect localhost.com to your local server's home page.
If you are using the Windows platform, then go to your %windir%\System32\drivers\etc and copy the host file to %userprofile%\Desktop. Open it with any text editor and remove the # sign from the front of 127.0.0.1 localhost. Save it and paste it back. Check if the problem is solved.
localhost.com is a website. It does not point to your local IP, instead it most likely has an A record pointing to Google's IP. It practically is Google, and I can prove it.
When the site worked if you connected using HTTPS then it would give a certificate error, the reason being that the certificate is signed to google.com but localhost.com is connecting.
I think the site has now been removed though.... I hope that solves it. It can cause some confusion since localhost points to 127.0.0.1.

Pow doesn't work - unable to find [myapp].dev

Pow used to work for me a few months ago, but now it's not working for my new app, or for the ones that worked before.
I went into ~/.pow and created a symlink, but when I type MYAPPNAME.dev/ in my browser, it redirects to a cox(my internet provider) page saying "Sorry, the website subscriptions.dev cannot be found"
I read through all the docs in the pow page, and tried installing powify as well, but nothings working.
Is there something I may have done in my console (such as changing PATH or things) that may cause this to not work?
I tried restarting my computer as well, but still nothing..
=============================================================
Edit: Actually I just came to my office and it started working. Is it possible that my internet provider at home could be blocking/interfering with pow? I would assume that it's irrelevant since I thought pow was essentially a local host.
DNS hijacking from your ISP. Try setting your DNS server to 8.8.8.8 (google's DNS) and see if the problem persists.

Wamp server has deleted my Service Package

I just when to continue with my web site in Flash builder and there was an error. When I looked into it my Service folder which held my PHP script is missing and unfortunately I hadn't backed up for some months.
Has anyone had this issue and is there a way to get it back? it just disappeared :(
C:\wamp\www\index-debug\services\CustomerService.php is missing
Never happened to me. You can use "Handy Recovery" or "recuva" to get your file back. Good luck with that

Resources