Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

John Delorbe
John Delorbe
3,192 Points

Trouble with localhost not working

so i went and installed xampp , apache and mysql are running but when i go to my browser and type in "localhost" i get redirected to the localhost/dashboard i have tried looking up the solution with no luck so i am asking treehouse members for a hand. I am trying to also set a password for mysql but i cant since i cant get to where i need to go. PLEASE HELP! I can give more details if needed.

you, like I, really need access to PHPMyAdmin. See my edits to the dashboard below to add a link to the new, sucky dashboard.

6 Answers

Lee Ravenberg
Lee Ravenberg
10,018 Points

Hi! Try emptying your browsers cache. Also check if your host file is not configured to map to localhost/dashboard

http://teamtreehouse.com/library/windows-local-php-dev-environment Is this workshop helping you?

John Delorbe
John Delorbe
3,192 Points

i emptied my browser cache no luck , still am being send to localhost/dashboard . how can i change the configuration's so it can direct me the xampp page ? i also watched the video but no luck . i will watch again

Your project has to be in the htdocs folder. If you have the index.php (or html) file in the htdocs folder, it should work without more. If you have it in a subfolder like I do, then you need to use localhost/subfolder

John Delorbe
John Delorbe
3,192 Points

no luck ted , not even localhost/subfolder

I don't know if I can give you the full answer today, but I recently had to hack the start page to get to PHPMyAdmin. I had to locate the start page, change the permissions of the file, add the location to the navigation so I could start it for the database.

That said, I have not had problems running my projects because they are all located in sub folders in the htdocs folder. As long as the server is running you should not have a problem. I did have to change the settings of the htdocs folder to 777 in order to save my projects there.

You may try putting a folder named test in the htdocs folder. Then put a simple index.html file in it. Then try both localhost/test and localhost/test/index.html. If neither work, there has to be a problem with your setup.

John Delorbe
John Delorbe
3,192 Points

I have tried everything suggested to me with no luck , its been two days already i had also deleted and downloaded xampp multiple times now and still get the same thing , where i am directed to localhost/dashboard. i have tried localhost/xampp and that just sends me here (Index of /xampp

[ICO] Name Last modified Size Description [PARENTDIR] Parent Directory -
Apache/2.4.16 (i erased the content in here ) Server at localhost Port 80) .

I have fallowed the instructions on how to download xampp , but when it comes down to the browser i get the dashboard page instead of the xampp page .

Im going to keep trying to figure it out not quitting yet , if i do get it to work i will let everyone know . but please keep throwing any suggestions you might have . thank you

When you say you only get the dashboard, are you talking about the screen that looks like their web page that says it is installed or the orange page?

Also, please give use the full path for XAMPP and the full path for the project you are trying to view.

John Delorbe
John Delorbe
3,192 Points

its not the orange xampp page (that's the one i am trying to get to) but its the blue Apache friends page that just talks about xampp . my test.php works fine i just cant get to the xampp page still

Deleted duplicate post.

I have the same issue since updating to the new 'dashboard.' It sucks. All that I really needed from that page was the link to the phpmyadmin page. I edited the page that you get to add PHPMyAdmin to the navigation. I tried some but didn't spend too much time on it as it works for my dev environment and I made it so I could get what I needed.

EDIT: This is the line I added to the navigation so you don't have to read the entire index.html file:

<li class=""><a href="../phpmyadmin/">PHPMyAdmin</a></li>

This file is htdocs/dashboard/index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">

    <!-- Always force latest IE rendering engine or request Chrome Frame -->
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Use title if it's in the page YAML frontmatter -->
    <title>Welcome to XAMPP</title>

    <meta name="description" content="XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl." />
    <meta name="keywords" content="xampp, apache, php, perl, mysql, open source distribution" />

    <link href="./stylesheets/normalize.css" rel="stylesheet" type="text/css" />
    <link href="./stylesheets/all.css" rel="stylesheet" type="text/css" />
    <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

    <script src="/dashboard/javascripts/modernizr.js" type="text/javascript"></script>


    <link href="/dashboard/images/favicon.png" rel="icon" type="image/png" />

    <script type="text/javascript">
      //<![CDATA[
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-76894-1', 'auto');
        ga('send', 'pageview');
      //]]>
    </script>
  </head>

  <body class="index">
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=277385395761685";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="contain-to-grid">
      <nav class="top-bar" data-topbar>
        <ul class="title-area">
          <li class="name">
            <h1><a href="/dashboard/index.html">Apache Friends</a></h1>
          </li>
          <li class="toggle-topbar menu-icon">
            <a href="#">
              <span>Menu</span>
            </a>
          </li>
        </ul>

        <section class="top-bar-section">
          <!-- Right Nav Section -->
          <ul class="right">
              <li class=""><a href="/applications.html">Applications</a></li>
              <li class=""><a href="/dashboard/faq.html">FAQs</a></li>
              <li class=""><a href="/dashboard/howto.html">HOW-TO Guides</a></li>
              <li class=""><a href="../phpmyadmin/">PHPMyAdmin</a></li>
              <li class=""><a target="_blank" href="/dashboard/phpinfo.php">PHPInfo</a></li>
          </ul>
        </section>
      </nav>
    </div>

    <div id="wrapper">
      <div class="hero">
  <div class="row">
    <div class="large-12 columns">
      <h1><img src="/dashboard/images/xampp-logo.svg" />XAMPP <span>Apache + MySQL + PHP + Perl</span></h1>
    </div>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <h2>Welcome to XAMPP for Linux 5.6.11</h2>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <p>
      You have successfully installed XAMPP on this system! Now you can start using Apache, MySQL, PHP and other components.
      You can find more info in the <a href="/dashboard/faq.html">FAQs</a> section or check the <a href="/dashboard/howto.html">HOW-TO Guides</a> for getting started with PHP applications.
    </p>
    <p>
      Start the XAMPP Control Panel to check the server status.
    </p>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <h3>Community</h3>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <p>
      XAMPP has been around for more than 10 years &ndash; there is a huge community behind it. You can get involved by joining our <a href="https://community.apachefriends.org">Forums</a>, adding yourself to the <a href="https://www.apachefriends.org/community.html#mailing_list">Mailing List</a>, and liking us on <a href="https://www.facebook.com/we.are.xampp">Facebook</a>, following our exploits on <a href="https://twitter.com/apachefriends">Twitter</a>, or adding us to your <a href="https://plus.google.com/+xampp/posts">Google+</a> circles.
    </p>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <h3>Contribute to XAMPP translation at <a href="https://translate.apachefriends.org/">translate.apachefriends.org</a>.</h3>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <p>
      Can you help translate XAMPP for other community members? We need your help to translate XAMPP into different languages. We have set up a site, <a href="https://translate.apachefriends.org/">translate.apachefriends.org</a>, where users can contribute translations.
    </p>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <h3>Install applications on XAMPP using Bitnami</h3>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <p>
    Apache Friends and Bitnami are cooperating to make dozens of open source applications available on XAMPP, for free. Bitnami-packaged applications include Wordpress, Drupal, Joomla! and dozens of others and can be deployed with one-click installers.
    Visit the <a target="_blank" href="http://bitnami.com/stack/xampp?utm_source=bitnami&amp;utm_medium=installer&amp;utm_campaign=XAMPP%2BModule">Bitnami XAMPP page</a> for details on the currently available apps.
    </p>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <a href="http://bitnami.com/stack/xampp?utm_source=bitnami&utm_medium=installer&utm_campaign=XAMPP%2BModule" target="_blank"><img alt="Bitnami XAMPP page" src="/dashboard/images/bitnami-xampp.png" /></a>
  </div>
</div>

    </div>

    <footer>
      <div class="row">
        <div class="large-12 columns">
          <div class="row">
            <div class="large-8 columns">
              <ul class="social">
  <li class="twitter"><a href="https://twitter.com/apachefriends">Follow us on Twitter</a></li>
  <li class="facebook"><a href="https://www.facebook.com/we.are.xampp">Like us on Facebook</a></li>
  <li class="google"><a href="https://plus.google.com/+xampp/posts">Add us to your G+ Circles</a></li>
</ul>

              <ul class="inline-list">
                <li><a href="https://www.apachefriends.org/blog.html">Blog</a></li>
                <li><a href="https://www.apachefriends.org/privacy_policy.html">Privacy Policy</a></li>
                <li>
<a target="_blank" href="http://www.fastly.com/">                    CDN provided by
                    <img width="48" data-2x="/dashboard/images/fastly-logo@2x.png" src="/dashboard/images/fastly-logo.png" />
</a>                </li>
              </ul>
            </div>
            <div class="large-4 columns">
              <p class="text-right">Copyright (c) 2015, Apache Friends</p>
            </div>
          </div>
        </div>
      </div>
    </footer>

    <!-- JS Libraries -->
    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="/dashboard/javascripts/all.js" type="text/javascript"></script>
  </body>
</html>

I only changed the nav section to add PHPMyAdmin. If you find where the dashboard is located, you could change the index.php in htdocs to point to the dashboard you want. If you find it, let me know the location as I will probably make the change. I am using Linux and had to change the permissions so I could alter the file.

I have to say I was happy that I was able to figure this hack out. Thank you Treehouse for the knowledge to do this.