Sajad
Sajad

Reputation: 2363

wamp server cannot open Localhost

I am new in php and now i installed wampserver 2.2 application and when i click to Localhost option, the "Unable to connect" page shown in my Firefox browser.

this is my www folder:

enter image description here

And this is my index.php file:

<html>
<head>
<title>  Hello To PHP Learning! </title>
</head>
<body>

<?php
    echo  'Hello World';
?>

</body>
</html>

Upvotes: 2

Views: 23783

Answers (4)

Sajad
Sajad

Reputation: 2363

Have you installed the C++ Redistributable Package ?

You should install it before installing wamp!

Upvotes: 4

Tanuj Verma
Tanuj Verma

Reputation: 13

Causes for ’404 error in wamp server’: This problem happening for Port issue. You may be install some services which one taking Port 80. Like,

Skype IIS Express Web Server Some Torrent Clients Teamviewer ... So only ‘HTTP 404 error page not found’ happening.

Solution:

You have to change your wamp server Port number. Just do following simple steps,

Open httpd.conf file After run your wamp server, left click taskbar Wamp green icon. Then go-to Apache->httpd.conf

(Otherwise open like: C:\wamp\bin\apache\apache2.2.22\conf )

Change Listen 80 There, Line number 46 having “Listen 80″. Just replace 80 as “81″ like Listen 81

Change ServerName localhost:80 And Line number 171 having “ServerName localhost:80″. Just replace with same number as you used Line number 46. Like, ServerName localhost:81 And save this file.

Use URL Just restart your Apache or Wamp then use URL like following, localhost:81 or 127.0.0.0:81 ( here 127.0.0.0: is your wamp IP )

localhost:81

Upvotes: 0

Balochlens
Balochlens

Reputation: 49

Did you Tried

127.0.0.1

instead of localhost

  1. IIS and Apache/Wamp are both web server and might conflict in some way, so you have to disable IIS in order for Wamp to work

Disable IIS : Control Panel, Uninstall Programs, Turn Widows Features On or Off, uncheck Internet Information Services

  1. if using skype, open skype > tools > options > connections > advanced > untick "use port 80 ..." then restart wamp then skype

  2. There might be port problem in httpd.conf change it to 80 instead of other ON LINE NO 40+

LISTEN 80

OR TRY TO CONNECT

  • The last but not least method

Try to uninstall WAMP Server and reinstall it in another Drive except same drive.

Upvotes: 2

Ivan Yonkov
Ivan Yonkov

Reputation: 7034

Your wamp server should be started (green icon in the tray), the Apache and PHP services should be ON.

In most of the cases wamp server launches Apache on default 80 port, which might be used (for example from Skype) when you try to start Apache, so kill processes that listen on port 80 before launching wamp.

Upvotes: 1

Related Questions