Zend Framework on MediaTemple DV

I’ve done this a few times already, and it seems every time I make the same time-wasting mistakes. So here’s the process quick and dirty (be sure to follow the links if there’s a point you don’t understand or know how to do):

  • SSH into your website, navigate to your virtual host directory – the directory above the webroot (the one right above httpdocs) – this is the default directory when connecting via FTP.
  • Via SSH, create the necessary “application” and “library” directories above your webroot (same level as the httpdocs folder).
  • Via SSH, chmod 0777 the “application” and the “library” directories.
  • Download the Zend Framework and upload it to your recently created “library” directory above the webroot (easiest with ftp, or you could do it the harder way via wget).
  • Add your newly created “application” and “library” directories to your approved includes directories via open_basedir configuration on your virtual host. You should be adding something that looks like: “/var/www/vhosts/mt-example.com/library:/var/www/vhosts/mt-example.com/application” – pay attention to colon, :, placement.
  • Make sure you restart the server.

If you’ve never used Zend Framework before, you may want to follow along with the Quickstart from here.

If you’re going to using Flash, make sure to make the change in the .htaccess I mention here. Also, if you plan on uploading images at some point and would like MIME type validation and/or file information you’ll need to install the PECL fileinfo extension as explained by Jeffrey Barke on his website.

That’s it. Kind of a pain since you have to do this every time you set up a new site (domain or subdomain), granted you could probably put the framework higher in the operating system and just link to it, but that has it’s own problems (i.e. framework version support/maintenance) and it wouldn’t save you any steps. Anyway, hope this is as useful to someone else as I know it will be to me.