My xampp installation 1.7.1 does not seem to work. http://localhost returns not found error.
Xampp Control panel shows both mysql & apache service running fine.
I'am on windows vista. Frustrated since past 2 weeks to find a solution to this. Any pointers and support will be appreciated!
Thanks a ton folks.
I struggled for days figuring out why I was getting a blank screen while using xampp. The cultprit was skype. Always turn of skype when you want to use localhost.
In your "xampp" menu group, one of the items is "Port Checking". If I run it, I get:
***************************************************************
* XAMPP PortCheck v1.2 *
* *
* (c) 2005 Carsten Wiedmann <info@wiedmann-online.de> *
* *
* This script uses openport.exe: *
* (c) 2003 DiamondCS <http://www.diamondcs.com.au/openports/> *
***************************************************************
Please wait a moment...
RESULT
------
Service Port Status
==============================================================================
Apache (HTTP) 80 C:\bin\xampp\apache\bin\apache.exe
Apache (WebDAV) 81 free
Apache (HTTPS) 443 C:\bin\xampp\apache\bin\apache.exe
MySQL 3306 free
FileZilla (FTP) 21 free
FileZilla (Admin) 14147 free
Mercury (SMTP) 25 free
Mercury (POP3) 110 free
Mercury (IMAP) 143 free
Press <Return> to continue.
Can you run this, and what do you get?
You can also try the following (esp. if you get Apache (HTTP) Port 80 as in my results):
First see if apache is serving your port 80. I just did this with my setup using telnet.
telnet localhost 80
You should get a blank screen. You can type but there's no echo. If you don't get this, Apache isn't operating as your localhost web server, so we need to find out why.
If it is, choose a file you know exists in your web server root directory (using "index.html" as an example, enter (you may not see what you type):
GET /index.html
Apache should just display the file contents (in raw form). See if you get this far.
- try your machines IP (eg 192.168.x.y)
- try tcp/IP-Loopback: 127.0.0.1
- try your computername (use
ipconfig /all
to retrieve your computername) ping localhost
and compare the ip
Have you upgraded to PHP 5.3 on Windows recently?
If so, change 'localhost' to '127.0.0.1'. See: http://bugs.php.net/45150
Here is some code which can be used to make an installation portable:
# Convert localhost to 127.0.0.1 on PHP 5.3.x on Windows (Vista); see http://bugs.php.net/45150
if ($hostname == 'localhost') {
if (substr (PHP_OS, 0, 3) == 'WIN') {
if (version_compare (PHP_VERSION, '5.3.0', '>=')) {
$hostname = '127.0.0.1';
}
}
}
来源:https://stackoverflow.com/questions/817745/localhost-not-working-on-xampp-both-service-apache-mysql-are-fine