SpringOne Americas

Private Events

Blogs

View all Blogs >>
  • Andrew Glover

    Co-author of "Continuous Integration"

    Every once in a while the topic of code coverage surfaces, which more»

  • Stuart Halloway

    CEO of Relevance

    Programmers coming to functional languages for the first time cannot imagine life without variables. I address this head-on in the more»

  • Richard Monson-Haefel

    VP of Developer Relations, Curl Inc.

    more»

  • Neal Ford

    Application Architect at ThoughtWorks, Inc.

    The lowly whiteboard is one of my favorite tools for design work on projects: you can stand in front of it as a group, you can easily play... more»

  • Michael Nygard

    Agile technology leader and dynamicist

    Sizing, Danish Style Folks in telecommunications and operations research have used Erl more»

  • Matt Raible

    Creator of AppFuse and author of Spring Live

    It's been three weeks since I joined the realm of the unemployed. Fortunately, I more»

  • Alex Miller

    Sr. Engineer with Terracotta Inc.

    Or maybe that should be “a bit of final advice”. :) There was a more»

  • Vladimir Vivien

    Software Engineer / Consultant

    I finally downloaded the latest JDK 6 u 10 (download) recently. This is a significant re more»

  • Scott Leberknight

    Chief Architect at Near Infinity

    Re nae Bair's post on The Ranting Rubyis more»

  • Graeme Rocher

    Project Lead of the Grails Project & CTO of G2One

    Those crazy guys over at the Grails podcast interviewed me about various things ranging from being part of more»

  • Ted Neward

    Enterprise, Virtual Machine and Language Wonk

    Dustin Campbell, a self-professed "IDE guy", is speaking at the .NET Developer's Association of Redmond this evening, on the future of... more»

  • Pratik Patel

    Enterprise Architect

    There's been a 'backlash' of sorts brewing in the Java developer community over the past 2 years. From talking to my developer buddies around... more»

  • Howard Lewis Ship

    Creator of Tapestry and HiveMind

    Seems like the Mac has a huge number of RSS readers. For a while I was using Vienna, but it stopped working after a recent update (no blogs... more»

  • Mike Levin

    Software Developer specializing in Web2.0 websites

    (photo from more»

  • Brian Pontarelli

    Founder of Inversoft

    Just figured out how to get git tab completion working in zsh on a Mac. Turns out that the completion scripts use a bunch of extra git... more»

  • Erik Doernenburg

    Principal Consultant @ Thoughtworks

    If you are somebody who writes code you probably know that moment when you look at some code you didn’t write, or some code you wrote a... more»

  • Kirk Knoernschild

    Software Developer & Mentor

    more»

  • Brian Goetz

    Author of Java Concurrency in Practice

    I live in an AT&T-free state, so I have not had access to the cult that is iPhone. But recently, in preparation for AT&T moving... more»

  • Matthew Bass

    Software Developer & Entrepreneur

    Can Sphinx and foxy fixtures place nicely together? Due to the way Sphinx indexing works, foxy fixtures will often slow down the indexing... more»

  • Jason Rudolph

    Author of Getting Started with Grails

    I had the more»

  • Ryan Shriver

    Business and Technology Consulting

    more»

  • Nathaniel Schutta

    Author, speaker, software engineer focused on user interface design.

    Today we learned something important, the NTSB announced the more»

  • Jeff Brown

    SpringSource Engineering And Professional Services - Groovy and Grails Developer

    Strange enough title.Let's start with a hypothetical conversation between a geeky developer and his much less geeky wife: more»

  • Jared Richardson

    Agile coach and co-author of Ship It

    Jurgen Appelo has an ongoing interview series on his blog. He's published a lot of very smart people and I'm honored to squeak in too! ;) more»

  • David Bock

    Principal Consultant, CodeSherpas Inc.

    I have been setting up a rock-solid server cluster for a client and ran into an interesting issue trying to install Phusion Passenger onto... more»

  • Pramod Sadalage

    Co-author of "Refactoring Databases:Evolutionary Database Development"

    Consider this Hibernate mapping @Column(name = "qReferenceId") public Long getQReferenceId() { return qReferenceId; more»

  • Craig Walls

    Author of Spring in Action

    At one time not too long ago, I wasn't a big fan of annotations. But then I let my guard down and even started liking them. But now I'm... more»

  • Kenneth Kousen

    President of Kousen IT, Inc.

    In this entry in my “Making Swing Groovy” series, I want to talk about threading issues. Specifically, more»

  • Venkat Subramaniam

    Founder of Agile Developer, Inc.

    I wrote a four part article for Java World on creating DSLs in Java and Groovy. For your convenience, I decided to list the links to those... more»

  • Jason Harwig

    Senior Software Engineer at Near Infinity

    The most popular entry I've written at Near Infinity has been the more»

  • John Heintz

    Principal Consultant with New Aspects of Software

    In a recent discussion interview questions came up, here's my favorite one.To set some context this question is designed to gauge the abst more»

  • Mark Johnson

    Director of Consulting at CGI

    At the Columbus NFJS show held on July 25-27th during one of the BOF sessions Dave Bock, Scott Davis and I discussed unit tests vs functional... more»

  • Joseph Nusairat

    Author of Beginning JBoss Seam & Co-Author of Beginning Groovy & Grails

    Well i am assuming Apress has the most random site in the world at times.But today only they have our recent book, Beginning Groovy & Grai more»

  • Keith Donald

    Lead of Spring Web and Creator of Spring Web Flow

    I am pleased to announce that Developing Rich Web Applications with Spring, a three-day bootcamp lead by SpringSource engineers on web... more»

  • Pete Behrens

    Organizational Agility Coach

    Marti nig & Associates Methods & Tools group recentl more»

  • Brian Sam-Bodden

    Java author, Ruby geek and Open Source Advocate

    In this installment we are going to build the Dashboard page of the Tempo application. T more»

  • Mark Fisher

    Spring Integration Lead

    In my recent post, I had mentio more»

  • Ron Bodkin

    Chief Software Architect, Quantcast

    I'm looking forward to speaking at The Rich Web Experience conference in San Jose next month. The event runs from September 7th through 9th.... more»

  • Mark Goodwin

    Web Application Security Specialist

    We've already looked at one of the two big problems posed by anti DNS pinning on Java applets; because there's rebinding on the applet and... more»

  • Scott Davis

    Author of "Groovy Recipes" & TDD Expert

    Every time I see a live show at the Denver Botanic more»

  • Romain Guy

    Java User Interface expert.

    more»

  • Ramnivas Laddad

    Author of AspectJ in Action, Principal at SpringSource

    InfoQ.com has published my AOP myths and realities talk recorded at a No Fluff Just Stuff conference. InfoQ.com founded by Floyd Marine more»

  • David Geary

    Author of Graphic Java and co-author of Core JSF

    The 2006 NFJS tour kicked off t more»

  • Kito Mann

    Editor-in-chief of JSF Central and the author of JSF in Action

    I miss the latest.integration keyword from ivy.... more»

  • Jason Hunter

    Author of Java Servlet Programming

    I just posted the JDOM 1.1 release for download. This release includes about 20 improvements and bug fixes. more»

Sun VirtualBox as a virtual development environment for PHP

Posted by: Cal Evans on 10/08/2008

Dear Reader,

The problem

For the past year I’ve been looking at the way I develop web based projects and how I can make it easier, better, faster, more stable, but most of all, portable. Like many PHP developers out there, I work on multiple projects at the same time. It’s not unusual for me to have three projects under development at any given time with an additional five projects that I’ve abandoned that I’m not yet willing to delete. I’ve developed a way of working with them that works for me. I’ve even written a Zend Framework based cli tool that sets up my work environment the way I like it.

All of that is wonderful if I’m sitting here in my lair connected to my local network. However, if I’m moving around, I have two choices, setup something like Zend Core or XAMPP on my laptop and duplicate my development server. This is the model I’ve used for the past few years but what I end up with is projects on my development server that I wanted on my laptop and visa-versa. The more I thought about it though, the more I realized there had to be a better way. My current setup doesn’t allow me to do things like test PHP 5.3 without setting up a whole new server just for that purpose, or maintain an environment like my production server - it has it’s own little quirks - so that I can work on legacy code.

Here is a short list of my criteria:

  • Must work on my laptop.
  • Must allow me to easily test different environments
  • Must let me work on multiple projects

The solution that doesn’t work

Yesterday I was browsing phpdeveloper.org like all good PHP developers should when I ran across a link to Kevin van Zonneveld’s blog post, How virtualization will improve your code. Reading it over, I begin to think he had hit upon the solution. He was using Sun’s new VirtulBox 2.0 to virtualize the development server. The only problem with Kevin’s solution is that he is running Linux as his primary OS (Host) and runs Linux as the virtualized (Guest) OS. Actually, it’s not a problem for him but it is for me since I use Windows as my desktop environment. I did feel though that he was moving in the right direction.

Installing VirtualBox is very easy and grabbing a copy of Ubuntu Desktop (Don’t use Server, it won’t work According to this thread The problem was a setting in VirtualBox and not Ubuntu itself. It may be safe to use Server if you like.) was actually the longest part of the process. Once downloaded, setting up the virtual server was actually anti-climatic. You just let the wizard get you going and then watch as Ubuntu installs.

One of the great things about VirtualBox is that it has a “shared folders” option. I simply define a directory on my Windows OS (Host), c:\web, as a shared folder and then mount that share inside the Linux OS. Once you you get it working the way you want, you jsut add the mount to your virtual server’s /etc/fstab and never think of it again.

The end result is I can still use Windows/Komodo as my development environment. My virtual server has Apache, PHP and MySQL installed so it can serve up the pages from the same directory. So far, all was going well. Here is where Kevin and I parted company though. Kevin was content to browse the work area using the browsers installed on the virtualized server. This is the easy way to do it because the browser and Apache are on the same virtual machine. I however, wanted to be able to browse the server from my Windows environment so I can test with IE, FF, Safari, etc.

Following the instructions in the Users Guide I setup a “Host Interface”, bridged it to my wi-fi card and setup my virtual server to use the new interface. (It should be noted that I know enough networking to be dangerous so the sentence above actually covered about 3 hours of running down blind alleys) Each time I tried a different combination, my new virtual server fired up just fine but failed to connect to the network.

After a lot of failed tries and a lot of googeling, I found the answer. (Which was, of course, in the manual to begin with) Most wi-fi cards are not capable of promiscuous mode. For bridging to work, Windows has to put the card in promiscuous mode.

Mine card, an Intel® PRO/Wireless 3945ABG, is capable of it but you have to have an admin tool to do it and while I can find the manual for the admin tool, I can’t find anyplace to download the actual tool itself.

Just to confirm that this was actually the problem, I snaked a cable into my lair from my server closet and bridged the host interface and my wired interface. Voila! it worked exactly how I wanted it to. But alas, since the solution is not portable, it won’t fit all my criteria.

Conclusion

Even though VirtualBox won’t meet my need as a development server, it’s still a cool toy to play with. It scratches my Linux itch while letting me keep my Windows desktop. Running it in seamless mode is a little more processor intensive but very cool. It puts the Linux toolbar at the top of the screen and Linux apps open as regular Windows windows.

I’m still in search of the perfect development environment. If I find it, I’ll let you know.

Until next time,
(l)(k)(bunny)
=C=

Tags: , , , , ,

Related posts


be the first to rate this blog


About Cal Evans

Many moons ago, at the tender age of 14, Cal touched his first computer. (We're using the term "computer" loosely here, it was a TRS-80 Model 1) Since then his life has never been the same. He graduated from TRS-80s to Commodores and eventually to IBM PC's.

For the past 8 years Cal has worked with PHP and MySQL on Linux OSX, and when necessary, Windows. He has built on a variety of projects ranging in size from simple web pages to multi-million dollar web applications. When not banging his head on his monitor, attempting a blood sacrifice to get a particular piece of code working, he enjoys building and managing development teams using his widely imitated but never patented management style of "management by wandering around".

These days, Cal's hobby is photography. As a photographer, Cal is a pretty good programmer. He continually tries, none-the-less, to improve his skills.

Cal is currently based in Nashville, TN where is the full-time father of two and fills the rest of his day as the Editor of DevZone, for Zend Technologies.

Cal is happily married to wife 1.23, the lovely and talented Kathy. Together they have 2 kids who are infinitely more intelligent but not nearly as entertaining as his two dogs, Sparky and Linus.

Cal blogs at http://blog.calevans.com.