Archives For Mac OS X

Rob Allen, an active Zend Framework developer and writer, recently explained how to setup PHP and MySQL on the latest version of Mac OS X, 10.8 (aka Mountain Lion). The article does assume some comfort with using the Terminal application (i.e., working with the command line), but goes through everything you need to know, including installing and enabling several common needs. If you’re using Mountain Lion and don’t want to go the MAMP route (I’ve stopped using MAMP and other all-in-one packages myself), this article should be everything you need.

In this edition…

Continue Reading…

In this edition…

Continue Reading…

Some time ago I stumbled upon the WWW SQL Designer, an online database modeling tool, created by Ondrej Zara. It’s built in JavaScript, and runs in the browser, although PHP is required for some functionality. You can download the code from its Google Code home page so that you can run it in from your own computer, but to see a demo of it in action (a completely usable demo), head to http://ondras.zarovi.cz/sql/demo/.

There’s not much in the way of documentation, but the tool is pretty straightforward, and there’s a YouTube video, if you want. To start, just create a new table, giving it a name. The tool will automatically create the autoincremented primary key for each new table. Then you can add other columns and indexes (aka keys). Add more tables as needed, and you can easily indicate the relationships between tables by marking foreign keys. Once you’re done with the design, you can export the SQL. The tool supports many different databases, including MySQL, SQLite, Oracle, and PostgreSQL. The outputted SQL is also nicely broken down, separating, for example, the foreign key statements and table properties (e.g., the character set, collation, and storage engine) into standalone ALTER queries, allowing you to use whatever commands you need when you actually go to create the database in your database application. The generated SQL even provides demo INSERT statements for the tables. Alternatively, you can save the design as XML, allowing you to reload that design in the application for further editing at another time.

I’m always on the lookout for a good database design tool, so was pleased to find this one. It’s particularly useful when I’m not on my primary computer, such as when I’m at a client’s office, and need to whip up some SQL on the fly. Check it out for yourself and see what you think. The price—free—is right!

MAMP without MAMP

February 24, 2012

For a couple of years now, I’ve used, and advocated using, the MAMP application as the easiest way to run a Web server on a Mac. Currently, the best argument for MAMP is that it doesn’t affect the built-in Apache. This also means that changes to the built-in Apache (via Mac OS X software updates) don’t impact your setup, as can happen if you modify and configure how the built-in Apache runs. Although MAMP itself is free, in time I went ahead and purchased MAMP Pro. MAMP Pro is just a better interface to the MAMP stack, in particular providing an easy way to establish virtual hosts, which I use extensively (i.e., I create a new virtual host for each client or personal project). But I think it’s now time to start doing MAMP—Mac OS X, Apache, MySQL, and PHP—without MAMP, the application. Let’s look at the history and the options here to understand why it may be time for a switch. Continue Reading…