Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Set up a PHP and MySQL development environment

Brett McLaughlin, Author and editor, O'Reilly and Associates
Brett McLaughlin has worked in computers since the Logo days (remember the little triangle?). In recent years, he's become a well-known author and programmer in the Java and XML communities. He's worked for Nextel Communications, implementing complex enterprise systems; at Lutris Technologies, writing application servers; and most recently at O'Reilly Media, where he continues to write and edit books that matter. His most recent book, Java 1.5 Tiger: A Developer's Notebook , is the first book available on the newest version of Java technology, and his classic Java and XML remains one of the definitive works on using XML technologies in the Java language.

Summary:  This tutorial demonstrates how to set up the Apache Web server, the PHP interpreter, and a MySQL database as a development environment on a Windows XP machine.

Date:  08 Jun 2005
Level:  Introductory PDF:  A4 and Letter (1456 KB | 36 pages)Get Adobe® Reader®

Activity:  17390 views
Comments:  

Before you start

About this tutorial

This tutorial walks you through the process of setting up your Windows XP machine as a PHP and MySQL development environment. You will start by downloading and installing the Apache Web server for handling HTTP requests (the type of request that you make every time you type a URL into a browser). You'll also learn how to configure the Apache server, so you can store your Web site documents anywhere you like. You'll even set up the default index files that Apache uses.

With a Web server setup, you'll then download and install the PHP scripting language. Beyond a simple download, you will have to configure Apache to pass requests through to the PHP engine. As with Apache, you will also learn how to locate your scripting files correctly, and secure them as well.

Once you have a Web server and a PHP scripting engine running, all that's left is adding a database. Typically, MySQL is the popular choice of database as it is cost-free and open source -- that is what I use in this tutorial. An alternative is IBM Cloudscape, which is also a standards-driven relational database written in Java. It's designed for embedding in the many Java apps and servers that developers use today. Here, you'll learn how to install MySQL on the Windows platform and connect your PHP scripts to a MySQL database.

By the time you're done, you'll have a complete development environment, ready for testing and development.

This tutorial is written for Web developers. If you're comfortable working with PHP and databases, then this tutorial will get you up and running on Windows XP (whether or not it's connected to the Internet all the time). If you're just getting started with Web programming, though, this tutorial will provide a virtual playground for trying out PHP. Whatever your level of expertise, as long as you are willing to take things step by step, this tutorial will get you ready to go on Windows.

You will also do some general Windows configuration, including setting up your environment. If you're familiar with PATH and other Windows XP environment variables, you're already set; if this is new to you, you'll get a brief introduction in this tutorial.


System requirements

All you need in terms of software and hardware is a machine running Windows XP (I use SP2, but I've run this same setup without SP2 for years). I'll walk you through all the downloading and installation, so you don't need any pre-existing software. You'll also need administrator access on your machine, so you might have trouble if you're working on a shared machine. Finally, you'll need Internet access during this tutorial to download software. Once you have the environment set up, however, you won't need Internet access.

1 of 8 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Web development
ArticleID=486400
TutorialTitle=Set up a PHP and MySQL development environment
publish-date=06082005
author1-email=brett@newInstance.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.