3 best native web developer tools for Mac OS X

Posted August 7th, 2010 in Mac OS X, MySQL, PHP by Damian

When I switched to the Mac platform (quite recently) I simply took all the web development software I used over to the Mac OS X. Most of it was cross-platform and I was familiar with it so it made perfect sense. To some degree.

As an ex-Windows user I didn’t realise that the UI on the Mac is quite different from the Windows one, both visually and usability-wise. This makes user interfaces of software originally written for Windows really awkward to use. I decided to look for more native and free alternatives to my PHP development apps.

Having tried several packages in each category, here is what I found to be the best.

Best PHP IDE for Mac OS X

I have been a long-standing fan of Eclipse PDT. I always liked how complete the feature set of it was. However, Eclipse really feels sluggish and ugly on a Mac. That’s why I tried Netbeans, which looks native (althouth also Java-based) and is soo much faster than Eclipse. It also has as a more back-to-basics approach to the UI while maintaining quite a rich feature set at the same time.

Best MySQL management tool for Mac OS X

Although I use PHPMyAdmin daily I realised that a good desktop application for managing MySQL is still a better tool for the job. Having tested a few of them I decided to go with Sequel Pro, whose interface is simple and powerful at the same time allowing for inline data editing and simple column creation. It also allows you to connect through an SSH tunnel, which is particularly handy for remote databases.

Best LAMP stack for Mac OS X

MAMP is the king of local LAMP stacks on MacOS, hands down. Although quite a simple app it gives you everything you need to run you local server set up. It’s a bit of a shame that the option to create virtual hosts costs money.

One of the drawbacks of MAMP is that if you want to run Apache on port 80 it will ask you for you password every time you run it (annoying). Fortunately you can avoid that by running this app I wrote, which stores MAMPs password in your Keychain.

These are my favourite applications. What are yours?

Run MAMP on port 80 without a password – the easy way

Posted July 31st, 2010 in Downloads, Mac OS X, MySQL, PHP by Damian

If you use MAMP for your local web development with Apache running on port 80 you will find that it shows a password prompt every time you run it. It’s annoying to say the least.

Fortunately there is a way around this. I’ve put together a small app that runs Apache & MySQL from MAMP without asking for a password each time. It’s quite secure because it uses a stored password locked in the Keychain. It also quits Apache & MySQL when you quit the app itself.

Here is how to use it:

  1. Open the Keychain Access app and click ‘+’ to add a new item. Call the item ‘MAMP’ and enter the account name and password that you use to log in to your Mac.
  2. Download and launch the MAMP No Password app

Enjoy!

Release 1.1 updates (20th March 2013):

  • Added a dock icon menu to restart Apache and MySQL.
  • Changed the name of the app to MAMP No Password.
  • Added compatibility with OS X 10.7 and newer (thanks @robwierzbowski and Steve @ Tech Otaku)

How to workaround PHP’s SOAPClient bug when connecting over SSL

Posted November 12th, 2009 in PHP by Damian

Today, while integrating SecPay (aka PayPoint) payment gateway with an ecommerce site I’m working on, I came across a very annoying problem with PHP’s SOAPClient implementation.

When talking to a SOAP interface the first thing you want to do is obviously connect to the endpoint:

$this->soap = new SoapClient('https://www.secpay.com/java-bin/services/SECCardService?wsdl');

This looks correct and innocent, however it produces this nasty error:

SoapClient::SoapClient() [function.SoapClient-SoapClient]: SSL: fatal protocol error

Changing SOAPClient parameters doesn’t help and disabling wsdl cache in php.ini doesn’t do much either.

After googling a bit I found a couple of bug reports. It turns out PHP has issues talking to endpoints over SSL. *Sigh*.

Here’s a workaround I came up with to force PHP to connect:

$orig_error_reporting = error_reporting();
error_reporting(0);
$this->soap = new SoapClient('https://www.secpay.com/java-bin/services/SECCardService?wsdl');
error_reporting($orig_error_reporting);

As you can see the idea is simple. Just turn off error reporting before instantiating soapclient and restore it afterwards.

I hope this helps some of you frustrated by this bug.