I’m teaching a PHP/MySQL course at the local community college this fall. First order of business is to get everyone set up with a PHP development environment. I decided to go ahead and post the strategy for the course as a post here in case it may be helpful others just starting out in PHP development.
This post is meant to help the individual who is just setting out to learn PHP web development and has no previous programming experience. I’m listing a set of tools to help in that quest and giving some pointers as to how to initially configure them (though part of the reason these tools were chosen was that they require very little tweaking before you can start using them).
The OS used in this example is Windows, but all theses tools are cross platform (deliberately chosen for that reason), and the instructions will only change slightly for other OS’s.
Below are examples of installing a client (the web browser), a server stack (PHP and MySQL) and a code editor. They’ve been chosen based on:
- ease of install and use for someone new to all this technology
- cross platform
versions available for Windows and Linux flavors including OS X - extensibility
In particular, Firefox and Netbeans. As the user grows comfortable with these tools, they will discover that they contain many features to aid in web development. (firefox: firebug, web-dev toolbar netbeans: integrated source control, xdebug, etc)
PHP is a cross platform technology at heart so that enables a plethora of alternatives to the choices I’ve made above. So feel free to explore the other options and find the tools that work best for you.
Firefox
Install
Get the files from: http://www.mozilla.com/en-US/firefox/firefox.html
Install the firebug addon : http://getfirebug.com/
XAMPP
Install on Windows (windows 7 64bit edition shown)
Get the files from: http://sourceforge.net/projects/xampp/files


XAMPP should do this by default, but be sure to install at C:\

In service section check
-
Install apache as service
-
Install mysql as service
This causes those services to automatically start when Windows starts

Test install by opening a browser and going to http://localhost

Netbeans Editor
Netbeans PHP IDE
Download here
Configure after Install
Apply Updates

Go to Help > Check For Updates
Test
Now create a new PHP application project called {YOUR NAME}-week1


Place the project in the XAMPP htdocs folder

Confirm the URL your project will be found at. (In our case, Netbeans should make the right guess here, so just confirm and click ‘Finish’

Editor Will Open and Netbeans will automatically create a starter index.php file for you
Clean up some unneeded windows
close these windows (you can always get them back later if you like)
-
navigator
-
files
-
services
-
palette
Now to make a few edits and create a new file so we can start to get familiar with the IDE.
Add some PHP

See the file in a browser by clicking the green Play (>) button on the toolbar. The Browser should open at the URL for the file.

create another file called new-file.php
- Menu: File > New File
- Choose category PHP, File Type PHP Web Page
- Next
- Change the filename to new-file.php
- Finnish





