First install. Can't access localhost but can 127.0.0.1

Problems with the Windows version of XAMPP, questions, comments, and anything related.

First install. Can't access localhost but can 127.0.0.1

Postby specht15 » 01. August 2011 02:05

I installed XAMPP and am trying to run through the Wordpress install (http://tamba2.org.uk/wordpress/xampp/) so I can run it through XAMPP. I open the XAMPP control panel i start Apache and MySQL (both clearly running in green) from the control panel then try to open the browser and visit "http://localhost/xampp/splash.php" but just get "Unable to connect" in Firefox 5. Now if I put in 127.0.0.1 instead of localhost I at least access the welcome page. But then when I click the myPHPAdmin link under Tools I receive the following error:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
I changed the config.inc.php file

$cfg['Servers'][$i]['password'] = '';
to $cfg['Servers'][$i]['password'] = 'password'; with my pw in the quotes

I am modifying accounts/passwords and info using MySQL Workbench but can't get the error to go away. I would really appreciate any help.
specht15
 
Posts: 4
Joined: 01. August 2011 01:54

Re: First install. Can't access localhost but can 127.0.0.1

Postby WilliL » 01. August 2011 12:06

have a look to your .hosts file located at c:\windows\system32\drivers\etc

It should be similar to:
Code: Select all
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: First install. Can't access localhost but can 127.0.0.1

Postby specht15 » 01. August 2011 14:11

Willil- Thank you. Ive pasted my host file documentation below and noticed the little difference there at the end with localhost being listed on the line below before ::1 I dont know if that has to do with anything.
------------------------------------------------------------------------------------------------------------------------------------------

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 activate.adobe.com
::1 localhost
specht15
 
Posts: 4
Joined: 01. August 2011 01:54

Re: First install. Can't access localhost but can 127.0.0.1

Postby Sharley » 01. August 2011 14:17

WilliL is correct you have an issue with your hosts file.

Edit the file so it looks like this
Code: Select all
127.0.0.1 localhost
# ::1 localhost
127.0.0.1 activate.adobe.com
Save the file and try again to access http://localhost in your browser.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: First install. Can't access localhost but can 127.0.0.1

Postby specht15 » 01. August 2011 17:33

EDIT: ok i editted and saved the host file appropriately in the original directory and now I can access localhost but when I try to run the http://localhost/wordpress/wp-admin/install.php I get the error in my firefox browser:
------------------------------------------------------------------
Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
8/1/2011 12:51:47 PM
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
-----------------------------------------------------------------
Where can I find/post the error log for help from this if there is one?

Thank you so much for the help.
specht15
 
Posts: 4
Joined: 01. August 2011 01:54

Re: First install. Can't access localhost but can 127.0.0.1

Postby WilliL » 01. August 2011 21:35

if an object isn't found, there will be an entry in error.log
(Pathes are as suggested standard - if you changed them edit pathes)
Have a look to c:\xampp\apache\logs\error.log. It's a textfile, you my open it with your prefered text editor.
Usualy localhost means c:\xampp\htdocs.
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: First install. Can't access localhost but can 127.0.0.1

Postby specht15 » 01. August 2011 21:59

Ok thank you very much again Willil. Below is the error lines my log listed for my latest 404 errors. For the directory of the install file [http://localhost/wordpress/wp-admin/install.php] shouldn't 'wordpress' be the folder name i extracted in htdocs which is 'wordpress-3.2.1' since that is where the wp-config file is? or is that trivial?

[Mon Aug 01 12:19:23 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/wordpress
[Mon Aug 01 12:51:47 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/wordpress

EDIT: I didn't cut out the wordpress folder and paste it in htdocs... That's all I needed to do, so anyone with the same problem --> MAKE SURE TO CUT/PASTE THE 'WORDPRESS' FOLDER OUT OF THE 'WORDPRESS-3.2.1' DIRECTLY INTO HTDOCS. Thanks a bunch for all the help!
specht15
 
Posts: 4
Joined: 01. August 2011 01:54

Re: First install. Can't access localhost but can 127.0.0.1

Postby WilliL » 01. August 2011 22:18

You're welcome :D
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 113 guests