Saturday, March 5, 2011

Installing a Complete Web Development Machine on Windows 7 with CakePHP

The solution listed below is running PHP in IIS7, which actually works pretty good, all things considered.

1. Install Web Platform Installer

2. Install PHP Manager, PHP 5.3, CGI (including FastCGI), URL Rewrite Module (Not quite as bullet proof as Mod Rewrite, but very well done)

3. Install MySQL CE

4. Install MySQL Workbench (If you like GUI MySQL management)

5. Copy Over CakePHP to Library, and Add PHP executable path, and cake console path to Env PATH

I recently, installed Windows 7 on my laptop, (Thanks Chuck) and it gave me the opportunity to re-create my development environment.

Supposedly, Windows has a WebMatrix Package the creates a fully functional web server stack, but it uses SQL Server express, which always just seems so heavy to me.

CakePHP on Mac OSX

Ok, so some of you geeks out there may already know this, but I didn't so I will share it with you.

The newer version of Mac OSX has apache built into it. On OSX, Apache is called Web Sharing and the Web Server itself can be turned on in the System Preferences.

Also, PHP comes installed and ready to use via the command line.

If you want an actual Web Server stack there are a couple things you need to change to make it all work.
Htaccess – By default Mac disables the htaccess rewrites and stuff. So edit
the /etc/apache2/httpd.conf to AllowOverride in the Directory Directive.
PHP – By default Mac disables the PHP module. So edit the
/etc/apache2/httpd.conf and uncomment the PHP module.

And for those of us that wear the I heart CakePHP t-shirts...

To use the Cake Console directly from the command line – Add cake to the ENV path, by adding a simple file to the
/etc/paths.d directory that contains one line of the path to the cake console file.

And there you have it, a full blown Production Environment Grade Web Server right there in every Mac.

We use a Mac at work for preparing and uploading images to our web properties... I needed to tap a couple Soap APIs from the Mac and was getting ready to install the dreaded, bulky, MAMP. I was relieved when I found this fully functional web server built in, very cool.