PHP Sessions with AWS DynamoDB (SDK v3)

Lately, I’ve been undertaking a large-scale, back-office project to support our growing operations teams at Plastiq. The application started experiencing some hanging, which ended up being caused by native PHP session handling. I was able to fix the issue by swapping in AWS’s DynamoDB for session management and storage, and I thought it’d be helpful to document the steps I took.

More after the jump.

Continue reading…

How to install the PHP MongoDB driver on Amazon EC2

I recently found myself with the need to connect to a Mongo DB instance from a PHP application running on Amazon EC2.  The PHP docs led me to this MongoDB extension, which seemed to be a good fit for my needs.  Still, the matter of installation was a little bit less clear, considering that the EC2 instance was pretty barebones and lacked a fair number of the “standard” libraries that would enable this single line installation to work.

After a bit of finagling, I got everything to work via the steps I’ve outlined below.

Continue reading…

How to Run Windows on a Mac for Free

VirtualBox is fantastic open-source software that allows you to operate a virtual machine with another operating system. Though it works on most platforms and can run most operating systems, I have a Mac and I needed a Windows OS to run Microsoft Visual Studio. It took a little while to figure out, but here’s a little tutorial on how to run Windows on a Mac for free.  I’ll outline the steps to install VirtualBox, set up a virtual machine to run Windows XP, install some extra features, and enable file sharing between the host machine and the virtual machine.

Continue reading…

How to Create Custom Mac Icons

Creating Custom Mac Icons

Creating customized Mac icons for your folders, files, and applications is very easy – the most difficult part is ensuring that you have the right tools for the job. But hey, that’s why I’m here. 🙂 I’ve done the research to find the best ways to create your own customized Mac icons. Here’s a little tutorial on a couple methods that I have personally tested and confirmed.

Continue reading…

How to Integrate Propel 2 with Laravel 4.1.x

I was recently doing some prototyping with Laravel, the self-proclaimed “PHP Framework for Web Artisans”.  It seems to be gaining quite some traction within the framework community, and it boasts some cool features such as dependency injection via an Inversion of Control container and a groovy command-line interface called Artisan.  Even better, the framework documentation is clearly written, detailed enough to dig beneath surface level, and (most importantly) it works.

Laravel ships with its own home-brewed ORM called Eloquent (based on the Active Record pattern), but I wanted to see how easy or difficult it would be to integrate another popular ORM, Propel, into the framework.  This would be an important consideration if a project were already using Propel with another framework, but wanted to transition to Laravel without having to rewrite its data mappings.  I found a solid post online that outlined an integration for Laravel 4 and Propel 1.6, but Propel is now in version 2 so some steps were no longer accurate.  I ended up figuring my way around the integration, and wanted to share my notes in this post.

Continue reading…

How to Display Russian and Other Languages with PHP MySQL

I recently had to code a little web application that would interface with a MySQL database and display data on a webpage via PHP MySQL queries. The application had to support many international languages – the most difficult of which to deal with was Russian. Many forums suggested changing my character encoding to CP-1251, which is a standard Russian encoding in Windows. I needed support for all international languages, though, and using multiple character encodings wasn’t a headache I wanted to get myself into. It turns out that you can display all these characters using a UTF-8 encoding, provided you get the PHP and MySQL right.  Read on to find out how to display Russian and other languages with PHP and MySQL. Continue reading…

How to Use Custom Fonts with CSS3

One of the most common challenges any web designer faces is ensuring that their work appears as intended. Print designers have the advantage of creating the physical designs themselves, but web designers depend upon user environments (read, browsers) to render their designs correctly.

In the past, browsers could only render the fonts already installed on a user’s computer, which meant that users without a good library of fonts would miss out on designs that made use of uncommon fonts. CSS 3 introduces a new fix called @font-fact that could be the future of web design typography.  Continue reading…