7AMP – Creating a Development Environment
Nov 10th in PHP by Dan Wellman
Running a local development web server is one of the best ways of learning AJAX; reading up on it is one thing, but being able to pass the raw data back and forth between a browser and a server is really the only way to truly understand what is happening at a fundamental level. To create the dynamic and interactive apps and sites that we've come to know and love, you need a development server.
On Windows systems we really have only a few decent options available; we can use Microsoft's Internet Information Services (IIS), which is usually bundled with Ultimate or Business versions of Windows, or we can use Apache, the extremely popular open-source alternative. Remember when Microsoft enjoyed a 90% market share of the browser market? Apache is the MS of the web server world and at some points in its illustrious history has enjoyed almost total domination in its respective field.
Dan Wellman has been writing web-design and scripting tutorials for approximately 5 years. His first book Learning the Yahoo! User Interface Library was released in early 2008. His second book, jQuery UI 1.6: The User Interface library for jQuery, was released in early 2009.
Dan lives with his wife and three children in his home town on the south coast of England. By day his mild-mannered alter-ego works for a small yet accomplished e-commerce agency. By night he battles the forces of darkness and fights for truth, justice, and less-intrusive JavaScript.
IIS is generally quite easy to configure as it uses a graphical interface and is fairly intuitive, however IIS is geared towards development with the .net framework; .net is a proprietary language and generally you need something like Visual Studio to succeed in building web applications with it. Visual Studio does not come cheap (although free express versions are available and if you're really hardcore you could use notepad to write the code) and many people prefer the open-source alternative PHP.
Similarly, MSSql is a perfectly adequate database solution made by Microsoft, but like its other offerings, is also a proprietary technology. Mysql is free, open-source, and very, very popular. It's easy to use, robust and scalable and that's why many developers prefer it. To create development environment we really want to spend as little as possible so really our choices here are clear - Apache as the platform, PHP as the server-side language, and Mysql as the storage technology. But getting all these technologies talking to each other is not quite as straight-forward as running a few installers.
Getting Started
First of all, we need to download the installers for Apache and Mysql and the files required to run PHP. The installers can be found at the following locations:
- http://httpd.apache.org/download.cgi
- http://dev.mysql.com/downloads/mysql/5.1.html#downloads
On the above pages choose the appropriate MSI packages for your platform (e.g. x64 or x32) and requirements (you may as well choose the full SSL version of Apache). With PHP however, we don't want the installer, we want the zip file that contains all of the PHP files as there is more in this package than you get with the standard installer. It can be found at the following URL:
- http://uk2.php.net/get/php-5.2.11-Win32.zip/from/a/mirror
There are two different zip files for Windows on the PHP site, make sure you do not get the one with NTS (non thread-safe) in the name as this will not work with Apache (which is thread-safe). Before running the installers or unpacking the zip file we just need to do a couple of minor system tasks; we should stop any instant messenger applications temporarily as they can interfere with the Apache installation, and we should disable Windows User Account Control (UAC) as it interferes with the Mysql configuration utility. To disable UAC visit the User Accounts application in the Control Panel:
In the applet set the slider to the bottom setting:
Click the OK button and confirm the very last UAC notification you should ever receive (w00t!), then restart your machine as directed.
Installing Apache
The first thing we need to install is the Apache web server which serves web pages to browsers following HTTP requests, and forms the foundation of our development environment. Run the installer, click the next button to get started and accept the license terms. Click next again and you should then see the following screen:
Complete the dialog as shown above and click next again; on the following screen choose the Typical option:
We can now just keep clicking next until the installation occurs. Once finished you should see the Apache icon in the notification area; it should have a green play symbol to indicate that it is running:
As a consequence of Apache running successfully, we should be able to open a browser, type http://localhost in the address bar and see the following message:
Configuring Apache
The web page we're seeing is being served from Apache's default content-serving directory which is probably located somewhere like this:
C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs
That's fine, but it will be a bit of a chore having to dig that deep when we want to add or remove files. We can easily configure Apache to server content from a folder that is closer to hand; create a new directory on your C drive and call it apachesite.
In the Start menu group for Apache there is an option to Edit the Apache httpd.conf Configuration File, choose this and a text file will be opened. This is Apache's main configuration file; unlike IIS, Apache does not have a GUI for configuration, instead we must edit this text file to make changes to the server. Scroll down to the Main Server Configuration section, which begins on line 144. On line 177 there should be the DocumentRoot directive, which will be pointing at the directory mentioned above. Change this line so that it points to the directory we created on the C drive:
DocumentRoot "C:/apachesite"
Just below this directive are several Directory directives; you'll need to set the second one so that it points to the same path as the DocumentRoot:
<Directory "C:/apachesite">
Save the file and restart Apache which you can do by left-clicking the icon in the notification area and choosing Apache2.2 → Restart. To veryify that it works create a new HTML file called index.html in the new directory and request localhost from the browser again:
Installing PHP
Next we can install PHP so that Apache can run PHP files when necessary; create another new directory on the C drive and call it php, then open the PHP zip that we downloaded and drag the entire contents into the php folder. That's all we need to do as far as 'installation' is concerned; all we need to do now is configure Apache to use it.
Configuring Apache to use PHP
Edit the httpd.conf file again; after all of the AddModule directives near start of the file add the following new code:
####### PHP Config ###########
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
##############################
Save the file, but don't worry about restarting Apache yet as we need to make a couple more changes and restart the computer anyway.
Configuring PHP
Like Apache, PHP relies on file-based configuration; in the C:\php folder rename the file called php.ini-recommended to php.ini. Now we need to add a Class Variable to Windows so that it knows where the PHP files reside. You'll need to go back to the Control Panel and open the System applet. On the Advanced tab, near the bottom of the dialog is a button called Environment Variables - click this button and a new dialog will open:
The new dialog is divided into 2 sections; in the bottom section select the line that has Path as the Variable name (you'll need to scroll down a bit) and then click the Edit button below the second section to open the editor:
Go to the end of the Variable value line and add the following text to the exsting value:
;C:\php\;
This will map to the php folder we created on the C drive and which we unpacked the PHP files from the zip file into. It is very important that you don't remove any of the existing text in the value (or other programs on your machine, or your entire machine, may stop working) and that you enter the new text exactly as it appears above. Once this is done click OK on the three dialog boxes and restart your computer.
Once your computer has restarted, the Apache icon should still have the green play symbol on it and PHP should be configured successfully. To test it create a page in your text editor and add the following code to it:
<?php phpinfo() ?>
Save the new file as phpinfo.php in the C:\apachesite folder and then request the page by typing the following address in the browser's address bar:
http://localhost/phpinfo.php
Your browser should display the PHP information page:
Success! Now we just need to install Mysql and everything is ready.
Installing Mysql
Run the Mysql installer that we downloaded and keep clicking Next until you get to the configuration wizard:
Uncheck the Register box and then click the Finish button. Click next again and then on the following screen choose the default Detailed Configuration option:
On the next screen choose the Developer Machine option:
After clicking Next on the above screen choose the default option again on the following screen:
Go with the defaults that are selected on the next screen too:
And again, just go with the default option on the next page:
The next screen has both options checked, just keep them checked and move along:
Don't worry about checking the Firewall Exception box, whether this is required will vary depending on your system and firewall so you can do this in a minute manually if need be. Provided you just want the standard Latin character set you can again just choose the default and click next:
On the next screen keep the defaults, but also check the box to add the executions path to the Windows Path variable (we did this manually when configuring PHP):
Enter a new password for the Root account and then click Next again:
On the final screen click the Execute button and the configuration changes will be applied:
Once the wizard has completed you should see confirmation:
At this point you should restart your computer again. You aren't prompted to but Windows is fickle and the installation may not run correctly if you don't do it. So ensure you do.
Testing Mysql
Ok, so you're back after doing the reboot right? Good. Let's just check Mysql is running correctly. In the start menu there should be a Mysql Command Line Client application, choose this and enter the password you set when running the Mysql configuration wizard. You should see the following screen:
Enter the following command at the prompt:
show databases;
The databases in use should be shown; a test database is installed by default:
Type the command
use test;
The test database will be selected:
Let's create a basic table; type the following command:
create table users(name varchar(20), age int);
This will create a new table called users and add two columns to it, one to hold name data consisting of up to 20 variable characters (alphanumeric) and the second to hold age data as an integer. Hit enter and you should get the Query OK message to confirm the table was created:
To populate the table with some dummy data use the following command:
insert into users values('Dan', 31);
You should get the success message again after you hit enter:
As a final test we can check that the data has been inserted into the table corectly using the select command:
select * from users;
Which should show the table and the data we inserted:
Configuring PHP to talk to Mysql
All we need to do now is configure PHP to talk to Mysql; earlier on we renamed a file to php.ini in the C:\php folder, open this file now in a text editor. First of all, scroll down to the Paths and Directories section and find the extension_dir directive on line 536; change it so that it appears as follows:
extension_dir = "./ext"
Then scroll down to the Dynamic Extensions section which begins on line 628. In the Windows extensions section remove the semi-colon from in front of the following lines:
- extension=php_mysql.dll
- extension=php_mysqli.dll
That's all we need to do; save the file and once again restart your machine. After restarting you can check for Mysql support in the phpinfo.php page again:
This is pretty much a guarantee of success, but really we should create one more PHP file so that we can test that we can read the data from our database; in a text editor create the following file:
<?php
$user = 'root';
$password = your_password_here;
$database = 'test';
$server = 'localhost';
$connect = mysql_connect($server, $user, $password);
$select = mysql_select_db($database, $connect);
$query = mysql_query('select * from users');
$data = mysql_fetch_assoc($query);
echo 'Hi ' .$data['name']. ' you are ' .$data['age'];
mysql_close($connect);
?>
Save this as phpmysql.php in the C:\apachesite and request it using your browser; you should see the following message:
If this doesn't work, try putting your firewall into training mode and seeing if you get a notification asking whether to allow the application when you run the page.
Summary
We have now truly succeeded and have the perfect development environment for creating dynamic AJAX-powered pages. Sure, there may be various programs that we can run which will do some or all of the configuration for us, but which may or may not work on the latest version of Windows, but where is the fun in that?! Getting Apache, Mysql and PHP configured manually is an achievement and it gives us the opportunity to learn more about the platforms we're using when creating modern web applications.
User Comments
( ADD YOURS )Muhammad Adnan November 10th
isn’t appserv is also a good solution ?
( )Adit Gupta November 10th
I would still prefer WAMP, MAMP. I know this takes away that ”fun element”..but what if I am on some other machine??…WAMP can get me started in minutes….
( )arnold November 10th
I agree.
( )Matthew November 10th
yeah, wamp and mamp just make it really fast and easy to get started
Slobodan Kustrimovic November 10th
Completely agree
And instead of mysql command prompt i choose phpMyAdmin
Alex November 11th
I’m a fan of SQLyog myself. I’m worried it has a bad reputation as I rarely see it mentioned around the web…
Siriquelle November 11th
@Slobodan Kustrimovic … but dont you feel more like a retro code cave ninja warrior when you do stuff from the command line like… I shall now create a database… whopah!! and add a user with the required permissions… kachuah!! maybe its me but i get a kick out of being retro.. especially in my personal projects.. for a commercial project though speed is key.. so wamp is good or xammp portable.. shwapah!!
Lucas November 10th
Agreed. When setting up new systems WAMP is 1 min of “next / next”.
( )In Ubuntu desktop you go to Synaptic -> Edit -> Mark Packages by Task -> LAMP server and you are good to go
Tomáš Fejfar November 10th
XAMPP is even portable… so you’Re started in seconds
( )Kevin November 12th
Agreed, wamp is the way to go – unless you want to get into compiling stuff yourself.
( )Anton Agestam November 13th
Yeah, if you are on windows, WAMP or WAMP server is really good, this tutorial would have been more useful for linux, even though there are already thousands of them out there!
( )Burak November 10th
Thanks for the article.
I’ve been using WAMP, which is also awesomely simple to install and use.
( )Lamin Barrow November 10th
Plus you can add and switch between different PHP and Mysql versions with just a click. That’s my favorite feature.
( )J November 10th
To add to the mob, I’m with you. I use MAMP and while it has its drawbacks, you just cannot beat the simplicity of installation. Literally less than two minutes and maybe 5 button clicks…
( )Richard - Accessible Web Design and Testing November 10th
And there is XAMPP
( )Joey November 10th
Also a great program is USB Webserver, you download, unzip and fire it up. it is portable but i use for stationary use also.
http://bit.ly/Qwu71 (direct link to english version)
Regards,
Joey
P.s. localhost is set to port 8080, so the link is http://localhost:8080
( )Crysfel November 10th
i use WAMP because i usually don’t have the time for doing this
however it is a good start for beginners
( )Slobodan Kustrimovic November 10th
I wish i knew about WAMP when i started coding
So to all beginners, USE WAMP(or MAMP)
( )Ashwin November 10th
Good one. This is Pretty Explanatory tutorial. I like it. But WAMP is more easy then this.
I wish if you could have explained the same to configure with the microsoft IIS Web server would be more fantastic.
Good effort.
( )Thank you
Larry November 10th
I second this, a good explanation of IIS would be helpful.
Other than that, this is a very good article, I rather like these step by step articles. Sometimes my brain is to tired otherwise.
Thanks for the excellent article
( )Moneyxl November 10th
And Xampp is good too right?
( )David Knight November 10th
I use Xampp.
( )WebDevHobo November 10th
All depends. You can certainly use it, but I find that it doesn’t start half of the time on my machine.
( )Stephen Flee November 10th
XAMMP and MAMP are perfectly fine for getting started, and setting up your development environment. However, when you take the time to learn how to install and configure everything – it does give you some sever side knowledge that *WILL* come in handy at some point or another throughout your development career.
One thing to note about XAMMP and MAMP – out of the box they should never, EVER be used on a live website…they leave a lot of configuration opens open that will leave your site pretty vulnerable.
( )Dan November 10th
Was this tutorial written specifically for me, or is this a PURL?
My name is Dan and I’m 31. Kinda creepy.
Anyway, I’d rather use MAMP.
( )Ramanujam November 10th
WAMP for PC
( )MAMP for Mac
Period.
Seed November 10th
I wonder if someone will write similar article for Mac OS X?
( )Crysfel November 10th
as far as i know, you don’t need to do this in the Mac OS because it is there from the beginning
you just need to enabled. I think you only need to install the mysql server.
( )Seed November 10th
It’s true, but in Leopard for example there is now GB library, so it will be very nice to have article like this. And it is always good to know how install those stuff on your own.
Jeordy November 11th
I’ve just installed Mac OS X Snow Leopard Server and enabled Web and MySQL. That’s it. You can add multiple sites in Server Admin.
The only thing left is copying phpmyadmin to a local folder and your’e done.
Or just download and install Mamp of Xampp. These are full featured packages you can install on OS X 10.4 and up (i guess).
David Ferguson November 10th
Why go through all this when WAMP and XAMPP and others do the exact same thing, and its all automated? Why reinvent the wheel?
( )Dan Wellman November 11th
Doing it the original manual way is hardly re-inventing the wheel. WAMP and MAMP build on/automate the original process. If anything they are reinventing the wheel although by making it easier they are obviously doing a great service and are beneficial for many people
( )jay November 10th
Yeah, just use WAMP. It’s literally as easy and running a few installers
( )esranull November 10th
biraz farklı omuş ama güzel
( )Nah November 10th
There are several good and easy installed server packages out there so why even bother with installing things separately?
Xampp is my favorite.
( )IgnacioRV November 10th
Good tutorial, however, I won’t recommend using MySQL from console to begginers… it can be really messy. MySQL GUI Tools is a good solution to use MySQL databases from desktop. And it’s available for windows, linux and mac os.
As you said in the Summary, there are various programs which will do almost all the configuration for us. I’ve been using WAMP for my last projects, it works great for me.
( )Joe November 10th
Totally thought this going to involve working with AJAX after reading the first line of the tutorial’s introduction…
( )Lucas Zardo November 10th
WAMP is the best solution for windows. But if you always use WAMP, you never will know how a server works.
( )Stephen Coley November 10th
I definitely would prefer XAMPP, however I think beginners should take these steps just so they can run through the configuration process themselves.
Great tutorial.
( )Dustin November 10th
I use XAMPP as well, but I can’t even say how many times I’ve had to setup Apache MySQL and PHP on a windows machine like this, needless to say setting each component up manually is good learning, as well I have found, it can be easier to downgrade a component or setup up virtual hosts (like for wordpress MU) than tooling with the all-in-one packages…
( )Myfacefriends November 10th
nice tuts thanks., (im using XAMPP and WampServer)
( )dave November 10th
It is good to learn how to install each component and learn how they interact.
Once the learning is done, use wampserver and get an easy way to have different versions of the components installed. This helps with matching your live server configuration.
Also, for a combination of asp.net and a php/mysql system you can use the microsoft web platform installer. Easy to install and allows you include popular apps like wordpress.
( )Dan Wellman November 10th
Thanks for reading, appreciate that most prefer to install WAMP or similar, but for those that want to do it manually hopefully the guide will be useful
( )Michael November 10th
I;ve tried WAMP and XAAMP. I hate them, I much prefer getting my hands dirty and working with each service individually.
Thanks.
( )Helmut Schoppenhauser November 10th
I would like to recomend xamp
( )All Software and Tools you need to get things running everything in less than 5 min
Don´t be fool and loose your time…
Robert Kummer November 10th
If you do not want to install the whole stuff, than simply use a demobereich account. This service provides a SVN and TRAC for free. And the cheap business services Apache, PHP5, MySQL including an auto-deploy from SVN to the Apache-Space for you and / or the whole development team.
( )The service is only in german avaiable, but I can translate for you if it is necessary.
xaisoft November 10th
This is a great tutorial. I always love doing things manually. It keeps the brain sharp.
( )Jesse November 10th
Gosh, why not go XAMPP and be done with it??
( )James Snape November 10th
…and re-enable UAC? Or does MySQL need an attack vector open in order to run?
( )Darren November 10th
I’ve used wamp a while now and it’s so easy to install and setup that I don’t think I would go this route
( )Kevin November 10th
nice tutorial on using windows installers for Apache/PHP/MySQL.
If anyone is interested, my prefered method is via a Virtual Machhine on Vbox running CentOS and all the bells and whistles. By doing things this way I am created an environment as near to the production server as possible. Plus, I can transport the drive images to different machines and all my work is protected should I choose to do a clean OS install of my host OS.
( )dave November 10th
I’m all for XAMPP / WAMP / etc… BUT…
… everybody should install and configure the packages at least ONCE to start with, just to get an understanding on how everything links together.
Big difference between knowing “it works” and “how it works”.
Top job on the tutorial
( )Skunkie November 10th
As most of the time, wrong conclusions ar made about .NET because of a lack of even fundamental knowledge of the technology:
1. .NET is not a “language”. It is a development framework consisting of a huge class library for development and a runtime environment similar to JEE. You can use a whole bunch of languages within .NET.
2. The free “Express” IDE’s are still play a few leagues higher than most commercial or free PHP IDE’s (the IntelliSense code completion tool for example is absolutely unprecedented)
3. Modern OOP languages like C# are absolutely superior to PHP. The sytntax is somewhat similar, and a PHP programmer with some OOP experience should be able to find his way around in the .NET world after a couple of month. After switching, his productivity will just go thru the roof.
As you can see, I am a .NET fan. But even if you are not, you shouldn’t turn the whole thing down with two sentences just because of indifference.
( )Michael November 10th
I’ve tried learning .NET so many times over the last year and a half, I just can’t get my head around it. Simply given up.
( )Skunkie November 11th
Hi Michael,
with the MVC framework for ASP.NET out now, this is the technology train to hop on, really!
You should give it another try. All you need is a good book about ASP.NET MVC (i would strongly recommend Steven Sanderson’s “Pro ASP.NET MVC Framework”), a C# refererence and a couple of weeks where you block your evenings to simply sit down and learn by following the book’s example (actually, if you are already familiar with MVC on other platforms, you can just read the whole book in bed).
Why you should do this? Well, the reward you get at the end of the tunnel is really sweet. The use of LINQ (Language Integrated Query) to SQL for example:
Imagine you code a site for a car dealer called let’s say “Shiny Cars” and you will have to perfom a database query filtered by a maximum price a site visitor has entered into a search form. The method you call on this in your domain model class could look like this:
public IList GetVehiclesByPrice(float, maxPrice)
{
return from vehicles in ShinyCars.Vehicles
where vehicles.Price <= maxPrice
orderby vehicles.Price
select vehicles;
}
Have you ever seen an SQL query as elegant as this in any other technology? And you get full IntelliSense support when writing this code. That means if you type "vehicles." all of the vehicles attributes (i.e. the database fields of your relational database) are exposed to you.
(Recognize that the method returns just an interface of any countable generic collection (IList), so you can do whatever you want with the result and are not bound to a specific object type)
And the .NET technology is full of goodies like this…
Give it one more serious shot!
Stimul8d November 11th
Thank god there’s some sense here still; agreed on all points.
I’ll take this one step further and say the inevitable. Stop using php for anything but small projects and blogs; like we all know, it sucks!
Okay, it’s an easy language to leverage pretty quickly and it does a good job of hiding some of the complication of real web development but it’s just as easy and very likely for an inexperienced developer to write very poor, non-secure code. In fact it makes it pretty difficult to write anything but without knowing it inside-out.
Clearly, I’m on board with ‘Skunkie’ in my support of .Net.
If .Net is too complicated and you can’t understand it then either spend the time to learn software development from the ground up properly or stop developing,…you’re not good enough at it.
If on the other hand you have some ‘religious’ objections to using .Net for any reason, then try picking up another, more recent technology like maybe RoR or Django.
Either way, drop php. The opinion that php should be the default for all web development drives me crazy. At least try to look at other languages and frameworks,…I think you’ll be surprised how much better the competition is.
( )Dan Wellman November 11th
The purpose of my introductory para was not to ‘diss’ .net but to show that PHP is easy t install on Apache. I don’t think it’s ‘wrong’ to say that many people like using PHP. I didn’t say PHP was better.
I also did mention that there are free express IDEs to create .net apps…
( )Skunkie November 11th
Hi Dan,
i did by no means intend to offend you. Actually it is a very good tutorial, and an important one, too. Of course it is nice and easy to simply One-Click-install XAMPP on your system, and have a dev environment up and running in no time. At a certain point in your development carreer, though, you will be running into some problems that need manual fixing and it is good to know what’s under the hood then.
The point i just wanted to make is, that reading your intro one could assume that you will have to spend a lot money and are bound to a proprietary technology like .NET or even a specific language when using IIS.
Because this, of course, simply isn’t true.
1. You can use IIS with PHP and MySQL (actually a lot of ASP.NET providers offer exactly that alternative to .NET)
2. You can use the free IDE’s for up to solid medium scale projects without missing features (you can even set up complete solution environments with unit testing and domain model projects that compile separately, when you know how to get around the “Single Projects Only” limitation of the Express Versions). So you don’t have to spend a dime to develop on a very high professional level (actually the Express IDE’s are so good, that i regulary spend my spare dough for Adobe software updates rather than the newest version of Visual Studio, but don’t tell Microsoft, they might change their product policy)
3. You are not limited to a single language or only proprietary Microsoft languages when using .NET. Actually if you want to, you can use PHP under .NET with some tweaking (i know no one who will do this voluntarily, but if you have a PHP wizard on your project team and have to handle a gigantic migration project, it might make sense temporarily)
One shouldn’t forget, that a whole bunch of the worlds best programmers are on Microsoft’s payroll, why should they produce crap?
So, to sum it up – thanks a lot for this great tutorial about the Apache/PHP/MySQL universe. And of course, PHP has it’s legitimate place in the web dev world. I just wanted to get a possible misunderstanding about my favorite technology straight.
“Your mind is like a parachute. Functions only when open.”
Dan Wellman November 12th
Hi Skunkie, don’t worry, no offence was taken
Thanks for the detailed comments re .net IDEs and developing with them
I love your parting quote, very Zen
Thanks for reading
Dan
jzigbe November 10th
I used to use WAMP and XAMPP.
Now I use Mowes Portable. It is fantastic… try it, you will not go back!
http://www.chsoftware.net/en/useware/mowes/download.htm
( )doStuff November 11th
I second that. I made the switch from WAMPServer to Mowes two years ago, and I have never looked back.
( )Marc Loney November 10th
A very nice tutorial.
I must say I remember back to when I began web development and the hassle of trying to set up these services.
I think people always underestimate learning what happens ‘behind the scenes’ in a web development world where we are oversaturated with our lovely IDE’s and frameworks. Behind it all there is still raw code and there is benefit in know how it works to get the most out of your applications.
I think services like WAMP, etc are great but what happens when you want to get a bit more complicated such as wanting to run an environment with Rails, Perl and PHP side by side? While these out-of-the-box solutions are great for speed, knowing how to configure your services correctly and bespoke to your system as this tutorial has shown in great.
( )Rizky November 10th
hi Dan,
pretty basic stuff dont u think? u can find tuts like this all over the web. and dont u think modern web development involves a wider range of technologies than just simply php, apache and mysql?
my development platform consists of apache, php and mysql for the usual stuff. but i also have ruby + rails, perl and python + django. coz some of my more recent projects needs those too. oh, and i use svn (also as an apache module) and git for versioning.
i’m on a mac. so most of it are installed. but it took a while for me to set it up properly. if only someone could write something about “creating the ultimate development platform” back then.
just my suggestion
( )Dan Wellman November 11th
There are not that many tutorials aimed specifically at Windows 7. There are many for win xp and vista sure and a few for win 7. There are also ‘How to install WAMP on Win 7′ tutorials so there must be more to it than simply running an installer…
This article looks at the basics and by following it and learning how these platforms work, installing additional stuff like RoR, perl, python, Django etc should be easier.
( )kavidu November 10th
good work.thanks
( )Shiro November 10th
Great Tutorial, make me understand how WAMP internal how it’s work
( )Casey McLaughlin November 10th
I personally use easyphp
( )Kalicka November 11th
Recomending non-utf character set is terrible.
With latin character set you can not support countries who do not use english – vast majority of world.
I have so much problems with eshops and others sites where I have to write my address or something in my language – and the systems does not accept it or damamages it…
!!! Use UTF-8 in database, HTML and in programming language !!!
( )Jozef November 12th
Yes, i agree. !!!UTF-8 is a MUST!!! for developing web application for todays world. Every php coder should read about new i18n features in PHP 5.3 and use it for new projects.
http://devzone.zend.com/article/4799
( )Skunkie November 12th
Absolutely correct!
I used CodeIgniter for some small projects in the past, and it always was a pain in the butt that all the files were not utf-8-encoded. Every time i hardcoded a string for output, i ran into trouble.
I ended up converting all the files into utf-8 just to make sure. Horrible.
( )Dan Wellman November 12th
Thanks for providing this extra info guys
I’ve also gone with the default Latin encoding when installing this setup but its good to know what else can happen when non-latin is required.
I’d just like to remind people that this guide is intended for local development only, do not use this default setup for a live website
chipsambos November 11th
… or install xampp or xampplite
( )Andy Gongea November 11th
Nice tutorial Dan.
Even though we use one of the existing packages, it is great to see how you can configure all stuff and take control of your development environment.
Cheers!
( )sandeep November 11th
nice tuts thanks…
( )John Rawsterne November 11th
Nice tut, but life is just to short to reinvent the wheel.
XAMPP all the way for me
( )DevLano November 11th
At some point, you WILL have to go beyond wamp/xammp. learn now and make life easier when that time comes. :-p
( )Stoian Kirov November 11th
I prefer manual installation
( )Good tutorial. Thanks
Bilal Çınarlı November 11th
Nice tutorial, but as everyone said, why to bother when there is a single click alternatives like, WAMP, MAMP, XAMPP
And yes I’m a XAMPP user too
( )Patrck November 11th
Now I don’t want to start a flame war…but this is my #1 reason for moving to OSX. It’s built by developers FOR developers. Having Apache running with command line support is something that any flavor of Windows just cannot offer. Yes, there are all the free flavors of Linux available…but until the Adobe suite runs in the Linux environment, it’s just not a viable option.
Again…this is just my OPINION.
( )infocyde November 11th
Another thing to check out is Abyss from http://www.aprelium.com/. runs php and asp.net web sites, pretty cool, used it for some personal stuff, can’t vouch for it for high traffic sites though. Supports a lot of features and is under a 1 meg download. Abyss is often over looked.
( )Shaun Dunne November 11th
Maybe a tutorial on setting up a LAMP enviroment on a VM would be good, as a lot of applications will be deployed on LAMP stacks and due to the differences in WAMP/MAMP/LAMP and the way they handle server side code such as PHP, will save headaches later on.
Of course AJAX will run fine on any platform, i just personally prefer to use a VM and LAMP.
( )Daniel Fisher November 11th
I get it done in less than 1 minute… IIS + FastCGI + PHP using Web Platform Installer:
( )http://www.microsoft.com/web
teebee November 12th
I like Server2Go (http://www.server2go-web.de/) because it’s a portable app and you can get it in different flavors (read versions) of Apache, MySQL and PHP.
( )Megan November 12th
Uniform Server is just so darn easy to use and already has php, mysql, etc
( )http://www.uniformserver.com/
Eric Culus November 13th
Wamp, Xamp or even better Zend Server CE is will make setting up your proper dev environment more easily.
( )cbgreenwood November 13th
good tips for newbies, now how about setting up cvs or svn with that?
( )Juan Felipe Alvarez Saldarriaga November 15th
I use Zend Server Community Edition (http://www.zend.com/en/products/server-ce/), works on windows, linux and mac, lots of features, you can use iis on windows if you want, you can use deb packages or rpm packages and it comes with bytecode caching! it’s great
( )erkasoft web tasarim November 16th
I ‘m using LAMP. Also IIS7 for .net apps. Php, Apache, Mysql are very popular and simple. I prefery symfony mvc framework. ‘Simple’ is important for maintenance.
Thanks for this article Dan.
( )chris November 16th
wamp > this post
( )