localhost not working
Posted by: ischana (164.100.147.---)
Date: March 02, 2015 10:47AM

i have installed apache sever and php on windows 7 my apacher server is working with [127.0.0.1] it shows wamp server page but not with [localhost]
..kindly suggets
. i hv checked the following settings which are ok



c:\window\server32\drivers\etc\hosts file having entty 127.0.0.1 localhost yes it is

i also checked httpd.conf file it also has ServerName localhost:80


i am not able to solve the problem.

kindly suggest

Options: ReplyQuote
Re: localhost not working
Posted by: RiggsFolly (---.as43234.net)
Date: March 02, 2015 11:05AM

Your hosts file should contain


#IPV4 definition of localhost
127.0.0.1  localhost

#IPV6 definition of localhost
::1  localhost

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: localhost not working
Posted by: ischana (164.100.147.---)
Date: March 02, 2015 11:30AM

Yes. Sir,,these entries are already there since it is in window 7 it is like this

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

I have tried with uncommenting these lines but not working...
i also checked the apache port 80 which shows :

your port 80 is actually used by

Server :Apache/2.2.8 <win32> php/5.2.6


for ur info pl.

Options: ReplyQuote
Re: localhost not working
Posted by: ischana (164.100.147.---)
Date: March 02, 2015 11:56AM

i close this problem now....as after reading your new post of installing New wamp server....i installed new wamp server 2.5 and now there is no problem localhost is working fine

thanks

Options: ReplyQuote
Re: localhost not working
Posted by: RiggsFolly (---.as43234.net)
Date: March 02, 2015 12:02PM

They have to be uncommented to work! Those entries should look like the example I showed above.


Can you ping 'localhost' ?

Open a command window, and run

ping localhost

and

ping /4 localhost


You should get a result like this

Pinging MYPC [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Ping statistics for ::1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

and

Pinging MYPC [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: localhost not working
Posted by: ischana (164.100.147.---)
Date: March 03, 2015 06:22AM

OH My GOD

I am totally confused now... Someone told me to learn PHP it's easy but now i think this is not only tough but very confusing what i did

I had the problem of localhost so afte reading ur article i installed new wamp server 2.5. (earlier i had 2.0) i followed the instructions as given in ur article...problem of localhost was rectified everything was looking fine..i wrote a simple php program hello.php and run it worked fine OK

but today i checked my earlier written program of postgresql conection as (i simply copied this program from old wamp folder to new wamp folder)

<?php $con="host=localhost port=5432 dbname=dms user=postgres
password=postgres";
$db=pg_connect($con) or die('connection failed');
echo 'Connected to: ', pg_dbname($db);
?>

this gave me Fatal Error so I serahed solutions on the net..i did all the things infact many things like uncomment pg_pgsql.dll, php_pdo_pgsq.dll etc..someone suggested to copy libpq.dll from apache to php and someone to wtite load file libpq.dll etc ,,someone suggested that there are two php.ini files used differently by command promt and by browser etc..i did changes in both the files.....all mess up

now what i got

NOTHING solved pg_connect.php is giving FATAL ERROR and NOw when i start wamp server it first becomes RS then Pink and remains PINK now it is not GREEN....and lo localhost ..

Kindly suggest the solution and provide some simple way to do all these things....whay its so confusing..?
so kindly provide solution of hw to run apache server as GREEN (so that localhost runs) and then of postgresql connection problem. thanks

Inderjeet Singh

Options: ReplyQuote
Re: localhost not working
Posted by: ischana (164.100.147.---)
Date: March 03, 2015 07:29AM

both the problems resolved now...actually i have edit manually httpd.conf files and by mistake deleted some entries..
both problems resolved its ok now

another new problem that when i click on wamp icon and then try to open php.ini or

apache.conf i get the error like

Could not execute menu item (internal error)
[Exception] could not execute run action
the system cannot find the file specified...

why it is ? seems to be file location problem any suggestions?

Options: ReplyQuote
Re: localhost not working
Posted by: RiggsFolly (---.as43234.net)
Date: March 03, 2015 10:42AM

It might be a good idea to uninstall, then manually delete the \wamp folder.
Then reinstall.

It seems like you may have done more damage than you may have first thought.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.