Page 1 of 1

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

PostPosted: 19. March 2012 17:09
by YoniP
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!

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

PostPosted: 19. March 2012 17:29
by YoniP
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...

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

PostPosted: 20. March 2012 02:21
by Sharley
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, :)

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

PostPosted: 20. March 2012 09:05
by YoniP
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! :)

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

PostPosted: 22. March 2012 13:34
by adialb
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
 */

?>

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

PostPosted: 22. March 2012 18:31
by Sharley
@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
 */

?>

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

PostPosted: 24. March 2012 17:59
by YoniP
And what about my problem?

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

PostPosted: 24. March 2012 23:46
by Sharley
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.

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

PostPosted: 26. March 2012 18:18
by YoniP
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.

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

PostPosted: 26. March 2012 23:02
by Sharley
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.