Archive for the ‘PHP’ Category

Command Line MAMP

Saturday, June 23rd, 2007

I just installed MAMP on my Macbook. This is great, as it gives me MySQL, Apache, and PHP all ready to go. First, I restored default ports in preferences, and then I discovered the beauty of TextMate shortcuts when I typed in vhost[tab] in my httpd.conf file while adding in some of my dev sites. Beautiful. I was ready to go. Now, I just needed to load up some databases. Off to the command line… But, there was no mysqladmin. On top of that, the default php 4 install was in my way when I went to do pear upgrades.

The binaries I wanted were there. They just weren’t in my bash path. Once I found the directories I needed, I just added them to my path by appending the following lines to my ~/.profile…

# Add MAMP binaries to front of path
PATH=/Applications/MAMP/bin/php5/bin:\
/Applications/MAMP/Library/bin:$PATH
export PATH

You’ll notice the existing PATH is appended to the end so that my MAMP php binary is now found before the old php4 version when I type ‘php’ from the command line. I also have access to mysqladmin, mysql, etc. like I would on just about every other machine as well as apachectl so I can do things like config tests and vhosts dumps (apachectl -S).

In my opinion, this should really be a part of the MAMP install. Anyway, I thought I’d document it here for future reference.

Burst Labs on FWA

Monday, June 4th, 2007

Burst IconThe site JD and I made for Burst Labs made Site of the Day for May 27th, 2007 on FWA. If you haven’t seen it, you should check it out.

http://burstlabs.com/

Everything you see was built from scratch. The back-end is a custom MySQL database and admin tool I built using CakePHP. Middleware is AMFPHP, and the front-end is all Flash 8 Actionscript 2.0. When I have more time, I will try to blog a bit about some of the components I built.

Nerd Highlights:
- Custom data grid built with com.bumpslide.util.GridLayout supports mousewheel and paged data-loading
- State management with com.bumpslide.data.Model
- SWFAddress for deep-linking and Back-button support tied directly to the Model

JD has more on the subject.