Setting up PHP-FPM with Nginx on Ubuntu

Nginx, PHP, Uncategorized

In a previous post, I discussed how to use Nginx and Apache together on Ubuntu. I have Nginx listening on port 80 and Apache listening on port 8080. I use the Nginx proxy_pass directive to pass all PHP and Django domains (virtual hosts) to Apache. I will continue to use Apache for my existing virtual hosts, but I am going to use PHP-FPM for any new PHP domains that I set up.

Continue reading

Checkout My New Site - T-shirts For Geeks

Drupal: Adding an component to existing Feature using Drush

Drupal, PHP

On a recent Drupal (link) project, I installed the Environment Indicator module (link). One of the great aspects of this module is that it integrates with the Features (link) module. After featurizing the module’s configuration, I decided that I also wanted the feature to include the user permissions. I found that there are multiple ways to add a component to an existing feature.

Continue reading

Checkout My New Site - T-shirts For Geeks

Drupal: Using the Features API in Your Module

Drupal, PHP

Although, I have not written many posts about Drupal, I have actually worked more with Drupal over the last 4-5 year than any other web technology (except for jQuery). I recently created a module to control the display of a content type’s fields based upon roles (node add/edit). I created an import/export of the modules settings so that each environment (development, test, production) could be easily updated. The problem is that import/export is such a manual process that it was often overlooked during a deployment. So I decided to use the Features API to featurize my module’s settings.

Continue reading

Checkout My New Site - T-shirts For Geeks

Using Nginx and Apache together on Ubuntu

Apache, Django, Magento, Nginx, Ubuntu, Wordpress

I am beginning a new project that uses MEAN.JS (MongoDB, ExpressJS, AngularJS, Node.js). I use Apache as my webserver on my local Ubuntu VM. When I first read about using Express, I wondered how I would use Express and Apache together. Further confusion came when I learned that my host provider (webfaction uses Nginx to serve static files and Apache for PHP and other server-side technologies. So Node.js and Express will actually be running under Nginx. Because I wanted my development environment to be enulate production as much as possible, I decided to run Nginx and Apache together.

Continue reading

Checkout My New Site - T-shirts For Geeks

Using Zend Framework with Drupal

Drupal, PHP, Zend Framework

I have been using ExpressionEngine and Zend Framework on my current project. We recently migrated the cms to Drupal (see migration), but we wanted to keep the Zend Framework apps. Most of the content of the website is handled by Drupal 7 (link), but certain urls on the website are handled by Zend Framework. On the Zend pages, I removed all layout information so that it is controlled by the Drupal theme.

Continue reading

Checkout My New Site - T-shirts For Geeks

Migrating ExpressionEngine to Drupal 7

Drupal

I’ve been using ExpressionEngine on a project for almost two years. Although the end-users of the company like ExpressionEngine, my boss has never liked it and has wanted to move to Drupal for quite some time. We finally go the chance with the start of a new project. I have created websites using Drupal 6, but that was quite a few years ago. Now I was tasked with migrating ExpressionEngine 1.68 to Drupal 7. The entire script can be found on GitHub. Although the script is specific to ExpressionEngine, the steps required for migration can be used to migrate any content management system to Drupal.

Continue reading

Checkout My New Site - T-shirts For Geeks

Installing Joomla on Ubuntu

Joomla, Ubuntu

I’m redesigning my portfolio site and decided to use Joomla. I just installed it on my Ubuntu box. It wasn’t difficult, but it could have been easier.

First I downloaded Joomla from here. I had the option of download a nightly build, but I wanted the latest stable version.

Continue reading

Checkout My New Site - T-shirts For Geeks

CakePHP: Baking on Ubuntu

CakePHP, Ubuntu

I have been upgrading an web application for a client. I initially created the application using a custom php framework – spliced together however awkwardly, but it worked. In version 2, I included YUI 2.8, but have been using the same backend.

The site is nearly complete (ajax functionality, and database development), I decided that I needed a more structured php framework. I chose CakePHP primarily because I could bake the models, views, and controllers. With only 17 tables, The application is not very large, but the thought of creating models, views, and controllers for 17 tables did not sound exciting.

I could not bake on my Mac. I got an error, “Call to undefined function mysql_connect()”. I searched for hours trying to figure out why I was receiving the error, but to no avail. I think that I need to re-install PHP. Not going to happen. I instead decided to setup Cake on my Ubuntu box (See my post: Setting Ubuntu For Web Development).

Continue reading

Checkout My New Site - T-shirts For Geeks