Can't connect to localhost! [Closed - Non XAMPP Issue]

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

Can't connect to localhost! [Closed - Non XAMPP Issue]

Postby YoniP » 19. March 2012 17:09

Hiy

When i start xampp and i go to my localhost ( or 127.0.0.1) it goes automaticly to 10.2.52.72 and it doesn't open..
And i don't know why, this morning everything worked fine.
I can access localhost/phpmyadmin ...

Thanks!
YoniP
 
Posts: 5
Joined: 19. March 2012 17:06
Operating System: Windows 7

Re: Can't connect to localhost but can access to phpmyadmin!

Postby YoniP » 19. March 2012 17:29

My error.log is:
Code: Select all
[Mon Mar 19 17:08:43 2012] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/mysql
[Mon Mar 19 17:16:42 2012] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/ redirects me to anothor ip

I don't know what to do...
YoniP
 
Posts: 5
Joined: 19. March 2012 17:06
Operating System: Windows 7

Re: Can't connect to localhost but can access to phpmyadmin!

Postby Sharley » 20. March 2012 02:21

Drag C:\Windows\system32\drivers\etc\hosts file into an open blank page in your TEXT editor (Notepad for example).

Make sure the first line after the commented lines is
Code: Select all
127.0.0.1 localhost
If not then add it as the first line after the comments then save the file (you may need administrator permissions).

Then after clearing your browser's cache (Temporary Internet Files) try again to access http://localhost in your browser.

Please let me know if that solves your access problem.

Best wishes, :)
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: Can't connect to localhost but can access to phpmyadmin!

Postby YoniP » 20. March 2012 09:05

Done. But I still have the same error.

Code: Select all
127.0.0.1       localhost
127.0.0.1    www.activate.nero.com
127.0.0.1   microsoft.com genuine
127.0.0.1       localhost


Thanks for the reply! :)
YoniP
 
Posts: 5
Joined: 19. March 2012 17:06
Operating System: Windows 7

Re: Can't connect to localhost but can access to phpmyadmin!

Postby adialb » 22. March 2012 13:34

HELP!!

--------------------------------------------------------------------------------------------
Code: Select all
<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = '';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

/*
 * End of servers configuration
 */

?>
adialb
 
Posts: 1
Joined: 22. March 2012 13:23
Operating System: windows

Re: Can't connect to localhost but can access to phpmyadmin!

Postby Sharley » 22. March 2012 18:31

@adialb
I edited your post to enclose your config.inc.php in code tags.


Here is a default config.inc.php file (modified to add cookie in the auth-type setting) from an untouched XAMPP 1.7.7 zip file and I hope this is what you mean by your one word HELP post.
Code: Select all
<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

/*
 * End of servers configuration
 */

?>
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: Can't connect to localhost but can access to phpmyadmin!

Postby YoniP » 24. March 2012 17:59

And what about my problem?
YoniP
 
Posts: 5
Joined: 19. March 2012 17:06
Operating System: Windows 7

Re: Can't connect to localhost but can access to phpmyadmin!

Postby Sharley » 24. March 2012 23:46

YaniP wrote:And what about my problem?
Your error message file not found is correct mysql is not in the htdocs folder.
So http://localhost/mysql is an incorrect URL and will give a not found error.
You can't access the mysql folder using a URI only access is by using your Windows Explorer.

What do you see when you type in your browser?:
http://localhost/index.php
or
http://127.0.0.1/index.php

You never add htdocs to your address.
http://localhost/htdocs/any-folder/any-file.php
is incorrect.

http://localhost/any-folder/any-file.php
is correct.


http://localhost/phpmyadmin and http://localhost/webalizer are Aliased in the httpd-xampp.conf file and is why you can access then from your browser..

Redirection may be caused by a router setting (port forwarding perhaps) I am not too familiar with LAN settings but 10.2.52.72 is a LAN IP if that provides any clues.

Check your router settings and for router help visit the makers of the router.
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: Can't connect to localhost but can access to phpmyadmin!

Postby YoniP » 26. March 2012 18:18

Your error message file not found is correct mysql is not in the htdocs folder.
So http://localhost/mysql is an incorrect URL and will give a not found error.
You can't access the mysql folder using a URI only access is by using your Windows Explorer.

What do you see when you type in your browser?:
http://localhost/index.php => I can acces the localhost
or
http://127.0.0.1/index.php => I can acces the localhost

You never add htdocs to your address.
http://localhost/htdocs/any-folder/any-file.php
is incorrect.

http://localhost/any-folder/any-file.php
is correct.


http://localhost/phpmyadmin and http://localhost/webalizer are Aliased in the httpd-xampp.conf file and is why you can access then from your browser..

Redirection may be caused by a router setting (port forwarding perhaps) I am not too familiar with LAN settings but 10.2.52.72 is a LAN IP if that provides any clues.
10.2.52.72 is indeed my IP, but I when i go to localhost/website it goes automatically to 10.2.52.72, i have this problem only with Chrome. Not with Firefox!

Check your router settings and for router help visit the makers of the router.
YoniP
 
Posts: 5
Joined: 19. March 2012 17:06
Operating System: Windows 7

Re: Can't connect to localhost but can access to phpmyadmin!

Postby Sharley » 26. March 2012 23:02

i have this problem only with Chrome. Not with Firefox!
Then your issue is with a Chrome setting and is not an XAMPP for Windows issue so I am closing this topic.
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


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests