WAMP server in green but only get 404 - php

Alright ladies and gents. I have quite the puzzling issue. I have WAMP server installed on my WIN7 machine at work, everything was working fine and dandy. Didn't use it for a few weeks because I got pulled into other things. The other day I tried to start it up... The icon was green and I figured we were good. Then I tried to open up localhost and just get a 404 error:
HTTP Error 404. The requested resource is not found.
I have no clue why it's doing this, we were working fine 2-3 weeks ago and now nothing. Have any of you had the green icon but couldn't get any pages to come up? Where in the heck do I go because I'm beating my head against the wall here.
Thanks in advance.

It is also possible that some other service is running on port 80 (maybe IIS Express, some Torrent clients, Skype..). A solution could be to change the port on which is being listened (as Mithun Sen has said).
So change the port on which Wamp listens:
Click on Wamp server -> Apache -> httpd.conf
Change Listen 80 to something else, eg: Listen 81
I would also change ServerName localhost:80 to ServerName localhost:81
If you've done this, and saved httpd.conf, you have to restart the Wamp server.
Then use localhost:81 as your root url.
So the urls will then look like
localhost:81/phpmyadmin
localhost:81/mysite_directory

For me, all I had to do was click the WAMP icon then click "Put Online", and it went online. It may be the case for someone else out there as well.

try changing the port :
click on the wamp icon -> Apache -> httpd.conf
change the 'Listen 80' to 'Listen 81'.
Restart Wamp.

Check if the port 80 is being used by any other service. In my case the icon was brown and server was online and apache service wasn't started.
Here is what I did to fix it:
In my case "Web Deployment Agent Service" was using the port blocking the apache from using it.
Stop the service and change its startup type to "Manual" in properties by default it is "Automatic", this will avoid the problem from reoccurring.
Please find more detailed information on how to find and stop the service in link below :
https://stackoverflow.com/a/35252219/5894548

Just in case anyone else has the same problem, I will post how I fixed my issue.
I recently wanted to update my PHP in WAMP to a newer version. When that didn't work, I just decided to download a newer version of WAMP with a newer PHP version. After downloading and installing all the Visual C++ Packages I installed the new WAMP. I also downloaded a fresh version of Joomla, and put the files in the wamp/www/ directory. I opened up WAMP, got the green light, then tried to install the new Joomla. When I entered the URL: http://localhost/joomla/installation/index.php the file wasn't found. I didn't notice that the new WAMP I downloaded had a file name of "wamp64". I took the joomla files out of wamp/www/ and put them into wamp64/www/ and finally the installation file was found.
Maybe this piece of info will save someone else from pulling out their hair.

If you get
HTTP Error 404. The requested resource is not found.
even Wampserver light is green check your port 80
probably it is being used by another services. So you should do them;
1- Click on Wampserver the go to Apache -> httpd.conf
2- Find Listen 80 and change it to Listen 8080
3- save .txt filen and restart Wampserver
Note: if you have same issue after you restart your computer while port number is Listen 8080
1-Change port number again like Listen 8081 and restart all services, then click LocalHost.
2- if page opens again great, but if you had an error then change the port number back to Listen 8080 and restart it, You will see it will works..

My issue was that the files weren't really there.
I ran into this since I was upgrading from 32-bit to 64-bit.
I had all my files were within Wamp while localhost was looking for files within Wamp64.
So, all I did was move files from Wamp/www -> Wamp64/www.

I was experiencing the same problem and I fixed it by changing the Apache port from 80 to 81:
You do not have to use 81. Just make sure it is not 80 and that you use a port that is free, not something that you are already using.
I think in my case the problem started when I installed Microsoft SQL Server 2012, I think a service or something took port 80 and then when Apache tried to use it, the port was already taken. Fortunately it is an easy fix by simply using a different port.
Make sure you restart Apache at the end.

check the port, it might not be 80

Related

when i write localhost on my web navigator, i got this page

when i write localhost or even 127.0.0.1 on my web navigator to go to my apache, i got this website, instead of the usual debian localhost page, why? then minutes ago i could go to the default debian apache page, like that:
![click here to see the image][1]
but now, when i write localhost or 127.0.0.1 i got this page, why?
![localhost/127.0.0.1 page i got, click here to see][2]
Best guess is Wifi Lock is listening on port 80. you should try changing the Apache port to 81 or something.
It kept showing this wifilock.com page for me also. I went to " /etc/apache2/sites-available/ " and just removed all files except for " 000-default.conf ". Now it works perfectly.
I'm running a Kali Linux VM, and just typing in it's IP address into the browser from a seperate Ubuntu VM, so it should be the exact same things for Debian.
I'm pretty new to Linux, after trying countless things I've come across online this notion of mine finally worked, but hopefully hasn't messed anything up XD

How to point your local project on http://localhost:8080 port by wamp server?

I would like to point the local project folder to directly run on the localhost 8080 port. Please suggest me the ways to do that. Thanks in advance.
Just go to httpd.conf file, for ex. under WAMP environment its situated at:
C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
go to line no. 46 and edit Listen 8080 to your requirement for ex.
Listen 8383
newer versions of WAMP uses these 2 lines:
Listen 0.0.0.0:8383
Listen [::0]:8383
Next go to line no. 171 and edit ServerName localhost:8080 to your requirement for ex.
ServerName localhost:8383
Restart Apache and its done !!
Now, you can access with your URL:
http://localhost:8383 or http://192.168.1.1:8383 or http://127.0.0.1:8383
Hope it helps to people looking for solution here.
Note:: If you use VirtualHosts then you also need to update them to use instead of
WAMP Your Project links do not resolve to localhost [Fixed]
Go to the location where you installed your wamp
Normally its C:\wamp64\www\index.php
Use a text Editor i.e Nopepad, Notepad++
And find & change this line(33) to
$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'true' ? true : false);
Save your file Index.php and close it
Then go to the right wamp icon notification icon and click/Tap to put online
DONE!

Error installing XAMPP: Windows cannot find -n

I've been trying to install XAMPP for quite some time now, but every time, at the end of the installation, it says:
Windows cannot find "-n"
And after that, it says:
Problem running post-install step. Installation failed (php.exe) Perhaps you have to install Visual C++ 2008 package.
I have Visual C++ 2008 package and it still says this. What do I do now? I have Windows 10 64-bit for anyone wondering.
I installed it in the root of my C: drive and it worked. Strange that previously I could just install it in my program files folder and that everything works...
Had the same problem when I tried to install xampp in a folder with spaces in its name (some folder example)
It was solved after I reinstalled xampp in a folder that has no space in its name, E.g. c:/xampp
Change your registry settings.
Open Registry Editor by pressing Windows + R key combination, type in regedit and press Enter.
If prompted by UAC, click on Yes to continue.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
In right-side pane, look for a EnableLUA and set the value to 0 and close Registry Editor.
Restart your computer.
Source: windows10update.com
Then type in XAMPP shell:
setup_xampp.bat
That error could be shown if you already had an older version of XAMPP installed to the default folder (C:\xampp) and you try to install a new version in a specific custom folder.
Just go to the Windows Control Panel, Add or Remove programs and uninstall the old installation of XAMPP.
I can confirm using Windows 10, that the "Windows cannot find -n" message is indeed based on the fact that you are installing XAMPP in a folder which is not c:\xampp.
That is rather a huge oversight for those who distribute XAMPP, they should allow relative paths.
I was trying to set XAMPP in c:\webservers\xampp\ because I'm working with multiple versions of servers for testing and development and well, there goes that idea.
Of course, in the end, I could always just do it myself, and get each bundle I need such as APACHE, mySQL, etc.. And that would mean, not relying on XAMPP.
Anyways, it's a rather stupid flaw, but it is what it is, and it's free, so, you pay for what you get! :)
An alternative to the current answers: I found that installing in a folder with a dash also didn't seem to work for me. E.g. C:\xampp-test\ would still give an error. Changing it to C:\xampptest\ solved the issue.
I ran setup_xamp.bat once (w/o admin rights) and it did some configuration for XAMPP but that did not help. When I executed setup_xamp.bat again with admin rights, it gave a message "nothing to do!".
While looking at the Apache config I realized it is trying to listen on port 80 and I already had IIS listening on that port. Which was causing the problem.
So I changed httpd.conf to use a different port 8765 (change needed at 2 places)
Also changed httpd-ssl.conf to use a different port 8766 (change needed at 3 places)
Then in XAMPP Control panel > Config > Services and Port Settings > specified same port number for Apache.
Once that was done I was able to start Apache without any error.

wamp server not work but server is online my wamp server 2.4

Wamp server not work but server is online and all service start. my Wamp server version 2.4 .
[http://localhost/] result is blank page. source code not view. please help me now.
To start the WampServer, choose start WampServer from the Start menu; or run wampmanager.exe from the WampServer installed directory. An icon will appear on the icon tray. Green icon indicates that all the services have started. Red indicates that all the services have stopped. You can put the server online (so that user can access the server over the Internet) by selecting the option Put Online. Alternatively, you could put the server Offline, such that it is accessible only within the localhostthen verify the server.may be your problem is on port problem. change the port setting (using https://localhost:8080) and upload your files in www directory.
Start your server and then instead of this
http://localhost/
use this
http://localhost:8080
8080 is the port.
before that check weather your port is open
Sounds like Apache doesn't have a path to the PHP interpreter.
Go to System Properties -> Advanced -> Environment Variables -> Path
Add the path to the PHP interpreter at the end of the line. Mine looks like this:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\xampp\php;

Localhost or phpMyAdmin not found on server: How to fix?

I followed installation instruction for PHP, MySQL and PHPMyAdmin. But when I tried to access http://localhost/phpmyadmin/, I got this error:
"Not Found The requested URL /phpmyadmin/ was not found on this
server.".
Then I tried to access just the localhost, still I got same error.
How can i fix this problem?
I'm using windows 7 (if this problem has something to do with that)
1 sudo nano /etc/apache2/apache2.conf
2 search insert: "Include /etc/phpmyadmin/apache.conf" at the bottom of file.
and restart apache2
sudo /etc/init.d/apache2 restart
you just need to delete cookies from your browser
press (ctrl + shift + delete) then
time range to clear : Everything
check -> Cookies then clear now
done.
There really isn't enough information to be able to give you a reasonable answer.
First check that your Apache is running. Goto your start menu and type services.msc into the text field.
Fairly high towards the top of the screen you will see ApacheX.X
See what the status of the service is. Try double-clicking on the Apache service and pressing Start if the service isn't running. If it has troubles starting you will get a message telling you the service couldn't be started.
I was just having this problem and i've come across an easier solution:
left click on the wamp tray icon
apache>
apache modules>
check the 'rewrite module'
bingo!
I just finished installing xampp 1.8.2 on WinXP XP2 machine and got same error show up on my Firefox 24.0 browser:
xampp Not Found The requested URL /phpmyadmin/ was not found on this
server.
I solved this problem by changing the proxy of my firefox browser, go to menu tools-Option find tab Network, click button settings. Fill the text box below No Proxy for with localhost.
In my case then it looklike:
192.168.1.0/24, localhost
Then press Ok, then Ok again.
Try now typing localhost/xampp then it should show Welcome to XAMPP for Windows!
Note: to change proxy for other browser may differ, check your browser help about how to change proxy.
Hope this help.
Most likely it is the port conflict for apache server, by default is must be using port 80. You can goto apache configuration file, http.conf and change the port to a different one like: Listen 0.0.0.0:10021
This solved my issue.
If using wamp, you can right click on wamp -> apache -> Use port other than 80, give a port number. Restart all wamp services.
If you are not able to access localhost :
One possible reason might be is your apache server is not started. Go to start menu of your computer and search services, open it, find Apache, start the program.(Considering all the configuration of PHP and Apache has done correctly)
If you are not able to access localhost/phpmyadmin :
First of all, add phpmyadmin folder to your working directory. Download it from https://www.phpmyadmin.net and unzip it. Add the folder to your working directory and change the name to phpmyadmin. Now you can access localhost/phpmyadmin. You will see a login page of PhpMyAdmin application. If you are seeing file directories instead of the login page, then go to your apache server's httpd.conf(apache/conf/httpd.conf) file. Edit it and change the index.html of DirectoryIndex to index.php
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
It also could be because you have changed the directory name, where the phpMyAdmin server sits. make sure the directory/folder name is correct and matches with the locations you used for Localhost to set up.
Also, make sure you have set up MySQL server.

Categories