Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Downloads
  • Artworks

Archives

Recent Posts

  • Ai texas translation and more wtf
  • Get something in the mail
  • Not dead: Number Five is Alive
  • Ipso facto I passed
  • Argh philosophy
  • Up-grade
  • Beyond thought: liked, but…
  • Programming something…
  • Route 66: Oklahoma to Texas
  • I can has new internets!

Categories

  • Farmland chronicles
  • h00min resources
  • ITainment
  • Japanese Music
  • Japanese TV
  • Johnny's Jimusho
  • Korean music (kpop)
  • Korean TV
  • Music
  • Psychology
  • Solstice Productions
  • Tomohisa Yamashita
  • Webdesign

Recent Comments

  • Feles on Ai texas translation and more wtf
  • SnowMyth on Ai texas translation and more wtf
  • Feles on Get something in the mail
  • Ashtikun on Get something in the mail
  • Feles on Route 66: Kansas & Oklahoma

How to set up a local webserver

A local webserver is an absolute necessity for all people coding and using databases to test their applications before they are implemented online. If you’re coding ASP/.NET you’ll need Microsoft’s IIS (Internet Information Server) to run on your local machine. If you’re coding PHP it is likely you will run Apache. This article shows you how to setup a local environment to work with PHP and MySQL databases.

On the contrary of what people think, setting up a local ‘fake’ webserver to code and test on is pretty easy. There are a variety of packages out there you can use. For this article I have chosen XAMPP. Xampp is a software package that includes webserver software, PHP, MySQL and various other services. Know that installing the latest version of this software is rarely any good. Not only are most open source applications not ready for it, you’re at risk that your code won’t work online because most hosting companies are not up to date with these latest versions either.

To find out what your webserver is running:

Create a new file with notepad and call it “info.php”. In this file, write the following:
< ?php phpinfo(); ?>.
Upload it to your webserver and call the file. This will give you very elaborate information on PHP, MySQL, Apache version numbers.

Installing XAMPP
Download Xampp for Windows with the version number closest to that of your webserver and install it. The installation process isn’t difficult. It will ask you a couple of times if “you want to install ‘x’ as service”. Just say yes to each of those. After the installation is complete point your browser to: http://localhost. If everything went well, you see a website pulled up “XAMPP“. Choose your language to continue.

So far you are now able to code PHP on localhost. You must place all pages you make into “htdocs” [C:\Program Files\Xampp\Htdocs] or make subdirectories within htdocs. If you want to work with databases, we’ll need to configure some more. It is advised you do this step anyhow, because of security.

Configuring PHPMyAdmin/ MySQL
On Xampp’s main page menu, there is an option called PHPMyAdmin. This is the tool you use to manage your databases. If you enter it, you’ll get a few messages saying that it’s insecure to use. These messages we are going to fix.

1. Go to “Priveleges“.
2. Edit the user root.
3. Give the user root a password.
4. Shut down browser.
5. Find a file on your hard disk named config.inc in the directory xampp/phpmyadmin.
6. Open this file to edit it.
7. Find the line $cfg['PmaNoRelation_DisableWarning'] = FALSE;. Set it to TRUE.
8. Find the line $cfg['Servers'][$i]['auth_type'] = 'config';. Replace config by ‘http’.
9. Save the file.
10. Open your browser, point it to http://localhost/phpmyadmin.
11. A password dialog will show up. Insert the username (in this case ‘root’) and your chosen password.

You are now ready to use ‘localhost’.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:grin: :sad: :eek: :confused: :angry: :mad: :P :cry: :evil: :grr: :hoping: :smug: :bawl: :genki: :love: :hearteyes: :huh: :pissedoff: :ill: :mwahaha: :sweatdrop: :kickass: :drool: :wow: :wub: :sleepy: :unsure: :usuck: :victory: :innocent: :yippee: :hoi: :roflmao: :worship: :spank: :puke: :voyeur: :twitch: :fuming: :smokin: :omg: :food:

RSS Recent tracks

  • Strapping Young Lad – All Hail the New Flesh
  • Strapping Young Lad – Velvet Kevorkian
  • "Weird Al" Yankovic – Men In Brown (UPS PARODY)
  • Avantasia – Neverland
  • Strapping Young Lad – Happy Camper
  

© 2011/ 2012 - Code Silence