PHP development on Mac – my experience

A while ago I saw a lot of people writing about their PHP development environment and tools. I didn’t get around to it at the time but yesterday I found me some time to write down my experiences of moving from Linux to MacOS X as primary OS for PHP  and web development

Me and my partner in Dotvoid, a small web development and integration company, have used linux as a client OS for more than a decade. All the tools I needed for developing are there already; emacs, apache, php, MySQL, xdebug, other scripting languages, various compilers, OpenOffice and so much more. For my partner, Gimp and Inkscape have provided all the functionality for producing both designs and graphics. And all for free. Fantastic. Even so, a few months ago I suddenly decided it was time to abandon our ugly plastic laptops from Dell and Sony. I ordered two Macbook Pro. I haven’t used or even touched a Macintosh since 1995. But hey, they look good.

We soon discovered that some things aren’t as user friendly as we exptected. The multitouch trackpad with it’s gestures is wonderful. My partner still use Inkscape and Gimp under MacOS. Still excellent tools. But she needs more precision and bought the Magic mouse which she’s not very satisfied with. You can change the acceleration but not the speed. Annoying. OpenOffice also works like a charm on MacOS.

As for me I really – really – miss a decent keyboard with keys as delete, home, end, page up and page down. I didn’t expect them to be missing from the Macbook keyboard. In time I guess I’ll get use to the weird key combinations that is needed to replace them. I might even get used to the weird combinations needed to write backspace, brackets and curly braces. But the keyboard is not really designed for programmers. On the other hand the multitouch trackpad is great. Virtual desktops in MacOS is also a bit limited but it’s not a big issue. All in all I’m slowly getting used to the hardware and the way things work under MacOS.

However, MacOS is not enough. There are PHP distributions for Mac. But as I use Ubuntu in production I use Virtualbox to run a 32-bit Ubuntu in a virtual machine. After disabling the Intel VT-x CPU optimization the 32-bit Ubuntu runs as smooth as ever. For some reason Virtualbox refuse to disable VT-x for Ubuntu 64-bit which is the reason I have to use 32-bit. With the VT-x (optimization) enabled the virtual machine with Ubuntu freeze for a couple of seconds every five seconds or so. I work in many different places, in different wireless networks and often using 3G. To make it work in any network I’m connected to I needed to setup two network adapters for the guest OS. One network adapter to allow the guest OS reach the outside world and another for communication between the host OS and the guest. I also have Virtualbox running a windows installation to allow me easy testing in a windows environment without hassle.

When buying Macbooks I also decided to buy Zend Studio for MacOS. I haven’t looked back once to either PDT or emacs. It is a great feeling being able to use subversion, debug, refactor, run tests and much more in the same editor without setting things up and tweaking PDT. It just works. I’m happy with it. Let’s me focus on development. And it is not as slow as for example SpringSource Tool Suite for java development. The workspace with the projects I work on I have in a shared directory accessible to both MacOS and the Ubuntu virtual machine.

In addition I use MySQL Workbench a lot. It is also available for MacOS. It is a great tool for designing and working with MySQL databases. I still use the command line a lot as I’ve done since 1997 when I first started working with MySQL. But with just a few clicks the Workbench let me see changes between a database and the schema, export all the changes to a database in development, staging and finally production. (I always use an ssh tunnel to push schema changes to staging and production databases as I never allow ftp or anything else.) I still run the MySQL development databases on the virtual machine though.

OmniGraffle is another application I decided to buy. I use it to create diagrams and flowcharts but also to build graphical user interfaces. Especially when designing iPhone apps. Great tool and well worth the money. You can find stencils for most purposes at Graffletopia.

Even though we still use mostly open source software, compared to a linux environment, the move to Macbook cost a lot. Especially for a small company as ours. But after a few months I still think it’s worth the money. The actual hardware is great. Looks good. Silent although it does get a bit too hot underneath. The high resolution anti-glare screen is fantastic. I can even work in direct sunlight outdoors. I never want to see another crappy Sony Vaio. If only my Macbook could stop crashing every now and then I’d be really satisfied.

Tagged with: , , , , , , ,
Posted in PHP
35 comments on “PHP development on Mac – my experience
  1. paris says:

    hi there

    if your mac is crashing then you might want to look on which software is causing this, i have 100s of apps installed and i never get a crash of the OS, only specific apps which are not up to date.

    i suggest trying out, transmit as an ftp client, coda as a php editor that does not get in the way, and forklift i you were used a dual panel file manager

  2. Danne says:

    The mac is not really crashing as much as freezing. And I suspect it has something to do with Virtualbox. (Which has an update I haven’t installed. It might or might not solve my problems.) I won’t change to Coda. I’m sure it is good but it is missing a lot of features for php development I want built into the IDE.

    Forklift looks really good. I might take a closer look later.

  3. Ian says:

    I used to use VirtualBox but found it too unstable and primitave. I purchased Parallels during one of those $50USD bundle sales (which was not only heaps cheaper than Parallels but I picked up a few other beauties such as Textpander).

    Love Parallels. It’s stable :) I have it running a lot and when in Coherence, it silently sleeps itself until I need it. I’m sure VMWare is a sweet tool too.

    I use PhpStorm as my IDE but often resort to TextMate for quick edits. TextMate (which is really due for an update) is extremely powerful and has a small enough footprint to remain open all the time – ready for a quick text touchup.

    For my DB app, I use the free Sequel Pro. Clean, tidy and somewhat basic but it does much of what I want.

    Cheers

  4. Jose Sanchez says:

    I can’t understand why you changed your development platform. Moreover, If you are using linux on production server. Using the same plataform in development and production is a priceless experience.

  5. Danne says:

    @Jose Sanchez. Because I wanted to. Apple is not doing everything right. But most things are good quality. The number one reason is that I want to have good looking up to date hardware without roaming the web for solutions to various hardware compatibility issues. The other reason is curiosity. I still keep Ubuntu on my kids laptops. I still think linux is great for the desktop. But it has shortcomings. (As do Mac OS X)

  6. Markus Wolff says:

    I made the same switch a couple of years ago, mainly out of frustration with Windows Vista and the instability of using that as a work environment on the road. Being a tech specialist and having your notebook crash and/or malfunction in the least expected ways, constantly, while being at the customer’s office is really, really bad :-)

    Regarding your freezes, I’ve had the same problem. The solution, for me, was to remove the AppleHIDMouse and ParentalControl system extensions (.plist files). After that, I never got another system freeze and I don’t miss any functionality. They come back with every major OS update, so make sure to remove them again.

    Since I am now using the PHP bundle from Liip, I have given up on running a VM with Linux as a dev environment, even though this would be closer to the production environment in most cases. The reason is that I wanted to keep running my IDE on the host OS, but the performance and stability of this setup was abysmal: File access was terribly slow, either via SSH into the VM via ExpanDrive / MacFuse or via a Samba share on the VM guest, or via a shared directory using the Virtualbox guest additions. Each and every file access solution that I tried was too slow for big projects, Samba on the guest kept randomly freezing and/or timing out, ExpanDrive often slowed the whole system down due to high CPU usage.

    Thus, I no longer run a VM. Always wanted to try Parallels to see if it fares better, but didn’t yet get around to it.

    What’s your solution?

  7. Danne says:

    @Marcus Wolff I don’t seem to have any of your problems with Virtualbox. I use Zend Studio on the host and keep all the workspace files in a shared directory using the guest additions. The only thing I’ve experienced problems with is the VT-x optimization as I mention above. It must be disabled. I didn’t need to do that when running Virtualbox under linux. Oh – and the guests also need lots of memory. Give them to little memory and they will be slow.

  8. Norbert says:

    My setup is rather similar to yours, but for some small things I use the all in one solution (Apache, mysql, PHP) called MAMP (http://www.mamp.info/en/index.html).

    My preferred IDE is Netbeans.

  9. Clod says:

    Same experience on the DEL, HOME and END keys…the rest is as good a linux/bsd laptop usage in terms of tools and software. I didn’t install VMs as I have an alternative/old Window$ laptop for my .net or windows work related stuff… c”,)

  10. Danne,

    I did something reasonably similar to yourself. I totally agree that the transition, especially with the keys, keyboard shortcuts, getting a standard toolchain setup is quite a challenge to get used to at first. However after going through it, I’d never go back.

    I happily used Ubuntu Linux as my standard desktop for 10 years, but am feeling much more comfortable using a Mac now. It definitely is different getting used to paying for software after so many years of not having to.

    I’ve bought 1Password, Cornerstone and some other software and I don’t have a problem with any of them. Periodically the Mac does slow down a bit; especially if it hibernates with an external monitor and usb key and it’s woken without them.

    But a good solution that I’ve found is using Zend Server CE because it’s simple to configure and manage or, as you do, use VirtualBox with Ubuntu as the guest VM. That way it’s easy to keep the differences between the dev, staging and live environments to a minimum (always deploy with Linux).

    The editor to use on the Mac is definitely TextMate. It’s reasonably cheap, is quick and doesn’t get in the way. Also, github.com recently released github4mac which looks like quite a good tool so far.

    All the best to your success with developing on a Mac.

  11. Greg Berger says:

    I ran into the same inconvenience as you did. Especially with the keyboard which I’m not totally used to after almost a year. At the beginning, I also had a lot of charset problems working in development with Windows encoded xml’s parsing them in mac roman and deploying them on an utf-8 ubuntu server. Well that’s for the record ;)
    I also installed macports which is a must have for anybody coming from the Linux world as it allows you to install Gnu/Linux packages on your Mac OSx check at http://www.macports.org it’s really worth it

  12. Luca says:

    DevOp on Mac is GREAT, the two things that I’m missing are longer battery life and RAD enviroment like PHPRAD of Embarcadero.

  13. Ejsmont says:

    Well to be honest i still dont like mac. I have been using mac for PHP and Java dev work for 3 years now and it still makes me sick.

    Not that windows is better for PHP …. oh god no. It is just a constant pain of system differences, lack of particular version of some library or building some extensions. Every time i update mac or change php version i just waste so much time to get it all running again.

    Mac screwed me over so many times :) i think if anyone has a choice i would recommend develop on debian based systems like ubuntu. Having same system on dev and production is a big time saver also on debian building packages, pear, etc just work. No hacks and tears needed.

    cheers

  14. I am also a mac developer. I have been using macs since 2005 and have NEVER looked back to Windows. I generally use Ubuntu in my work environment if a mac is not available.

    Currently our developer sandboxes are not stored on our local machine. Therefore I use Transmit’s Disk feature to mount the remote share via SSHFS which is now built into Transmit. This is nice but I have noticed it crashes from time to time and the developers are looking into that issue.

    I have also used Coda and that has NO problems with the remote server. I create a site telling Coda the local path where the files will be, the server login information and path and checkout the repository. The checkout is only for your local machine so it’s not like you are executing svn commands to the remote site. This works nice but it is NOT AS NICE as Zend Studio as it has all the intellisense which saves time, along with the debugging tools.

    I do have to say that with the latest Transmit build I do not have any issues with the disk unmounting, etc. which i love because I can use Zend Studio all day long.

  15. I generally use MAMP if I am going to do development on my local mac and need to setup a server quick for development.

  16. Noah says:

    Have you tried Zend Studio for Eclipse on the Mac? Works like a charm… as long as you aren’t using a dual core processor in your Macbook Pro.

  17. Bravedude says:

    Reading your article, it seems you didn’t do your homework first. Switching versions of tools, packages always comes with some issues (minor or great), let alone switching platforms (linux 2 osx) like you did. It’s not a matter to be taken lightly. Especially when your paycheck is depending on it. IMO, you could have saved yourself a lot of grief had you done your homework and decided to make a case for buying mackbook pro’s. And btw, most of the things you mentioned are easily solvable. Yes they do look sexy, specs are decent, but nothing to write home to. You get get a system with better specs for 2/3 of what an entry macbook pro costs. To be honest i’m a bit baffled… i don’t know how you can justify these machines with all the points you mentioned and the application you use it for and still say it’s worth the money… its not making much sense. Anyway i wish you all the luck, I personally have a macbook pro now for about 3 months and very happy with it. Reason is i just got to iphone and ipad app development. I wanted to develop the apps in native osx environment so i wouldn’t have to mess with vm’s. In the 3 months i had my mbp, it only crashed once. Your’s shouldn’t crash that often as you describe, call the support if your unable to fix it, you shouldn’t have to live with all those crashes. Peace

  18. Roth Barry says:

    The resources I required for creating are there already; emacs, apache, php, MySQL, xdebug, other scripting dialects, various compilers, OpenOffice and so much more.

  19. Individual turbines are interconnected with a medium voltage (usually
    34. That is a enormous plus point of why you will
    need to have solar power to manage your home power source.
    Overall, reduced energy usage means that the need to go for building new
    transmission lines, infrastructure and other related devices can
    be delayed and prolonged. But most owners can expect to do very little for their panels over their lifetime.

  20. You could certainly see your enthusiasm in
    the work you write. The sector hopes for more passionate writers like you who are not afraid to mention how they believe.
    At all times go after your heart.

  21. That is very interesting, You’re an overly skilled blogger. I have joined your feed and look forward to in search of extra of your great post. Additionally, I have shared your web site in my social networks

  22. Hey Sage, Your blog site post is so just like mine from last week…
    within the tone along with the message! I’m dealing using a
    doable torn ligament or tendon in my ankle suitable now.
    Been on crutches for 3 weeks now. The entire process is painful and frustrating.
    I shared my journey with my blog site community and they have
    lovingly rallied behind me with supportive words, offers of support (from all over the world!), and thanks for “keeping it actual.” Among the points I constantly wish to be mindful of in my personal shares with
    my clients isn’t to get also self-indulgent, simply because then it truly is about
    me… not about serving them. When i pointed out that in my website post, they made sure to let
    me know I observed the proper balance, as I had provided
    them some wonderful content also while in the publish.
    So I could breathe a sigh of relief! I also desire to just send you a large hug of support and appreciate.
    Wishing you every one of the ideal on your healing and growing journey, Lara

  23. Right here is the right webpage for anyone who wants to find out
    about this topic. You realize so much its almost tough to argue with
    you (not that I actually will need to…HaHa).
    You definitely put a brand new spin on a subject which has been discussed
    for decades. Excellent stuff, just great!

  24. If some one wants to be updated with latest technologies then he must be pay a visit this
    site and be up to date everyday.

  25. Bamboo is tough and durable and a quick-growing
    sustainable material. You can conveniently switch the radiant
    cook surface with grilling elements. Read the easy instructions
    for making narrow hallways beautiful, a cunning home improvement project for women in smaller homes.

    my web-site: pompano huntington redondo beach plumbers

  26. In the celebs over the red floor covering to the gals in the powder room at a wedding event, it seems that folks have gone
    physique shaping crazy; it is worn out for a particular outfit.
    Fitness gurus that engage in outdoor sports appreciate clothes that enhance visibility as well as
    promote safety and comfort. Add to the fact that elements of rebellious youth culture,
    be it punk, skater, hip hop or metal, often embrace the hoodie as the outfit of
    choice, notoriously linking it to gangs or unseemly behavior.

    Feel free to visit my web page; pelvic floor safe dance exercise dvds

  27. Lee brings Amazon and Bezos and mixes long term bias with Annual Reports.
    After determining that you are qualified for a refund, the refund service
    will start the process or you. *A notice to
    let a business be aware to review reported information more closely-
    Letter 5035.

    Here is my webpage – Boca Raton Best Retirement Planning Tools

  28. One more thing on which you need to pay attention to
    is fats and this is something that you should not be
    consumed in the large amount. You finally screw up your courage – even if the
    news is bad, it’s best to know the truth, you tell yourself
    - and then do the test. Having a demanding work schedule,
    you need to look for ways in losing weight without having to sacrifice
    your job.

    Here is my webpage: hcg weight loss nashville

  29. If the moving affordability is tight, MR can help you locate the best deal in a matter of hours.
    Buying your own home is one of the biggest investments and commitments
    that most people will experience in a lifetime.
    In a consumer service industry where each member’s
    professional integrity is collectively criticized by mainstream media pundits at the start each new moving season, Interstate is one of the good guys.

    Visit my webpage :: miami movers flat rate

  30. She has a charm that is slightly reminiscent of the childhood favourite Rosie and Jim’s Ragdoll, with a modernized
    interior to suit the 21st century traveller. For instance
    at a time when anglers where sticking rigidly to the
    mantra of 3 to 5 milliliters of flavour, plus 1 to 2 milliliters of intense sweetener to a pound of base mix or more, as measured by 4
    large eggs or 6 medium eggs as a basis of measurement, I tried other approaches and reaped big rewards
    against much more experienced anglers. Some day you will have to divide your worms
    and start a new farm because of their rapid reproduction rate.

    My website fiberglass indel isotherm marine refrigerators

  31. ʟinkk exchange iss nothing else ƅut it is simply plɑcing thhe other person’s
    website link on your page at proer place and other person will also do same in favor of you.

  32. you’re really a just right webmaster. The site loading velocity is incredible.

    It seems that you are doing any distinctive trick. In addition, The contents are masterpiece.

    you’ve performed a great activity in this matter!

  33. After a quick lunch and a brief nap back at the mobile home, we resumed fishing about
    three o’clock and fished all the way until dark. Keep in mind the Cooper Mountain resort design their activities.
    Of course, lots of methods have evolved to try to avoid spooking fish out of your swim or even stop them
    from stopping feeding in the possible case of some line shy
    fish, and having them leave your swim.

    Also visit my web page: deck paint remover

  34. Very good information. Lucky me I came across your site by accident
    (stumbleupon). I have book marked it for later!

  35. tan says:

    It’s essential to have a clean skin before applying a tanner.
    Now apply your basic lotion again, to the areas mentioned before.

    This way you can simply wear a light robe to prevent any post
    tan smearing issues.

3 Pings/Trackbacks for "PHP development on Mac – my experience"
  1. [...] more here: PHP development on Mac – my experience RSS feed for comments on this post | TrackBack URL | Leave a [...]

  2. [...] the rest here: PHP development on Mac – my experience Category: TipsTags: other-scripting > [...]

  3. [...] PHP development on Mac my experienceJul 4, 2011 There are PHP distributions for Mac. But as I use Ubuntu in production I use Virtualbox to run a 32-bit [...]

Leave a 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>