Sep 13

Brad here again, and I hope you’ve been able to get XAMPP downloaded and installed.

Lesson 4 is all about securing your new XAMPP installation.

You really need to change the password for the user “root” because once you open up your website to the outside world, anyone will be able to change, delete and otherwise muck around with your XAMPP installation. You don’t want that.

Browse to:

http://localhost/security/xamppsecurity.php

You should see a page entitled:

“Security console MySQL & XAMPP directory protection”

Update: Leon kindly posted a comment about not being able to login using phpmyadmin afterwards, so I decided to check out my localhost installation of XAMPP (using the above URL). Here’s the page I get:

Its written in German, so…. the best way to see it in your own language is to go to:

http://localhost/security/index.php

and click on your preferred language.

If you browse to the above page, you’ll see a report that outlines everything you need to secure.

Click the link at the bottom of the page – that’s

http://localhost/security/xamppsecurity.php

Enter a new password into the two text boxes. You’ll need this later on, so don’t forget it, and do make it something hard to guess. (I’m sure you know what to do with passwords – I don’t need to tell you how important they are.)

Next, tick the radio button marked “http” on the PHPMyAdmin authentification (!) option.

Next, ensure the Safe plain password in text file? checkbox is turned off.

Click the “Password changing” button.

You should now get a message to say that the root password was successfully changed, and a reminder to restart the mySQL service.

To do that, click Start, click Programs, click Apache Friends, click XAMPP, click XAMPP Control Panel if it isn’t already running.

Click the button marked “Stop” to the right of the mySQL service entry. Wait until it says “Start”, then click it again. You’ve now restarted the mySQL database with a new password. Whenever you need to do any database administration in the future, remember to use the new password you entered above.

In the second section, entitled:

XAMPP DIRECTORY PROTECTION (.htaccess)

enter a usename and password to protect the main XAMPP folder.

Ensure the “Safe plain password in text file?” option is turned off.

Click the “Make safe the XAMPP directory” button.

All done! If it was all successful, you should see a page like this:

Administration of your XAMPP installation from now on:

Accessing the mySQL server database (lots of open source software, which we’ll be running under XAMPP, uses mySQL as their database) is as simple as appending “phpmyadmin” after your domain name (or localhost if running locally, which you would be at the moment unless you’ve gone a few steps ahead of the rest of us!)

The URL to get to your phpMyAdmin interface will be:

http://localhost/phpmyadmin

A standard Windows dialog box will appear – enter the username and password you entered in the steps above. You should now see your phpMyAdmin web interface. Don’t worry so much about it at the moment, but that’s how you need to access it later on.

Remember to restart the mySQL server before trying to log back in.

That’s about it for this lesson.

Please give me some feedback – too slow, too fast, unsure of what’s going on?

I’m here to hep you – please don’t hesitate to ask for assistance.

Lesson 5 is going to be a beauty!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

12 Responses to “Lesson 4 – Securing XAMPP”

  1. Leon Milroy says:

    Have got as far as Lesson 4 and when I put in the username and password to get in to http://localhost/phpmyadmin the username and password are not accepted even though I have changed them twice. It says access denied. even though I have made the Xammp directory safe.
    Maybe I should close everything and reopen?
    Thanks for the great tutorial I am enjoying it I hope.

    • admin says:

      Hi Leon!

      Thanks for visiting and leaving a comment! (There actually *is* someone out there!)

      Let me review this and I’ll get back to you soon.

      Cheers
      Brad

      • admin says:

        Hey Leon

        I think the problem is that you didn’t restart the mySQL server to pick up the new password?

        Give that a go and let me know. I’m glad you’re enjoying the tutorials. Is there anything else you’d like to see?

        BTW – how did you find the website? Google? Somewhere else?

        Cheers
        Brad

  2. Leon Milroy says:

    I tried again.same happened
    I am using Vista and downloaded Xampp win32-1.7.2
    I just noticed on the top of the security page after I clicked on make Xampp directory safe button the following appeared
    Warning: chdir() [function.chdir]: No error (errno 0) in C:\xampp\security\htdocs\securefunctions.php on line 205

    Thanks for being there

  3. admin says:

    Hi Leon

    Hmmm – Vista.
    Yes I’m running on Vista too, but I have UAC turned off. Maybe that’s the problem?
    I wouldn’t think so, but…. :)

    But it actually says “No error (errno 0)” in the message?

    Try restarting everything using the XAMPP Control Panel.

    Cheers
    Brad

  4. Big bonus says:

    Good morning
    I loose control!

  5. Ian says:

    HI

    It is really easy so far and is working really well.

    I also got stuck just at the log-in at the end of this lesson. I was trying to use the xammp directory protection username and p/w – what is required to see the localhost screen is the username ‘root’ and the assocaited root password.

    Enough computing for today – dinner time L:-)

    Thanks for your work on this – I’m hoping to use the platform to teach myself php programming and website building.

    Ian

    • admin says:

      Hi Ian

      Sorry to have been so long in replying…

      There seems to be a lot of confusion about this.

      Please let me review this in a sober moment, and I’ll see what I can provide in the way of instructions!

      Cheers
      Brad

  6. Mike Hart says:

    Well I am here agan with step 4 dcompleted with success. Woot

    • Mike Hart says:

      Hi

      No go on logging in to PHPMyAdmin
      I keep getting the username and password box come up
      If I cancel the box it says wrong username/password
      I have restarted Apache and sql and still no go
      Any ideas ?

      Mike

      • admin says:

        Hi Mike

        Let me review this again – its been a long time since I wrote this stuff – have moved house, had to re-install everything etc etc, so need to recheck what’s going on.

        Please bear with me – I want to help you get online.

        Cheers
        Brad

  7. admin says:

    Hi folks

    I’ll need to get a video up and posted to show you what you need to do to move forward.

    Thanks for your comments – I really appreciate them!

    Cheers
    Brad

Leave a Reply

Security Code: