Install memcached and APC on Mavericks Server 3 (Mac OS X 10.9)

Dramatically speed speed up sites hosted using Mac OS X 10.9 Mavericks Server (like SocialEngine, Drupal, WordPress, or other PHP/MySQL web site) by adding APC and Memcache.

Here’s how to install APC and memcache on Mac OS X Mavericks server, which runs PHP 5.4:

Continue reading

Rebuilding PHP extensions to work with Mac OS X Mavericks server and PHP 5.4

Because Mavericks server uses PHP 5.4, any extensions you may have compiled for previous versions of Mac OS X (such as memcache, apc, mcrypt) need to be recompiled and reinstalled.

This post assumes you used MacPorts to compile and install the PHP extensions in question. Here’s how to accomplish the task:

Continue reading

Change permissions on all files and/or all directories

I recently needed to change the permissions of all files inside a directory (only files but not folders), including subdirectories. From the command line in Mac OS X, I ran this command with success which changed all files recursively to 666 (rw-rw-rw-):

sudo find . -type f -exec chmod 666 {} \;

Likewise, to change only directories to 777 (rwxrwxrwx), I used:

sudo find . -type d -exec chmod 775 {} \;


Mac OS X 10.7 Lion supports freetype natively; ships with hardened PHP

Good news out of Cupertino. Apple’s new operating system, Mac OS X 10.7 Lion ships with a newer version of PHP (5.3.6), which has been compiled with GD, freetype, tidy (libtidy), and lots of other goodness.

Additionally, Apple has chosen to compile PHP with Suhosin Patch 0.9.10, which purports to substantially harden PHP. From the Suhosin web site: “It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself.”

Continue reading

Can’t display content hosted by Mac OS X server in an iframe? Here’s how!

Apache on Mac OS X is configured with security in mind. Apple has chosen to ship it with a setting that causes the x-frame-options header to be sent, which has the effect of causing content hosted on a Mac OS X server to not show up inside and iframe on another site.

Well-written web apps (like WordPress) already send the x-frame-options header. My personal preference is to turn this off globally and then ensure that my web apps send it as needed.

Here’s how to disable it:
Continue reading

Install memcache and APC on Mac OS X Server (snow leopard 10.6, Lion 10.7, Mountain Lion 10.8)

Looking to speed up your SocialEngine, Drupal, or other PHP/MySQL web site? The combination of APC and Memcache can really speed up sites based on these platforms. If you’re an admin of a server running Mac OS X Server (10.6), here’s how to install APC and memcache on Mac OS X server:

Download and install MacPorts from

Continue reading

Enable AVI, FLV and DivX encoding in Podcast Producer

Podcast Capture iconExcited at the prospect of using Flip Ultra and Flip Mino cameras and uploading the video via Podcast Producer, I was disappointed to discover that both Flip cameras wrap their video in AVI files, and use the 3ivx codec, effectively thwarting my Podcast Producer plans. Videos uploaded via the Podcast Capture utility resulted in audio-only posts to the wiki/blog server.

That highlights one common complaint I’ve made and heard about Podcast Producer — that it demonstrates it’s heritage with a decided bias for Apple-endorsed wrappers and codecs (read: QuickTime).

In my quest to use these fantastic(ly inexpensive-but-handy) Flip video cameras, I recently found out that simply adding a QuickTime plugin to Mac OS X 10.5 server provides the capability to transcode far more file formats and encodings than the stock installation of Podcast Producer allows: AVI, FLV, 3ivx, DivX, MS-MPEG4 v1 & v2, Flash Video, Indeo 1 & 2, to name a few!

The solution is drop dead simple (as any Mac OS X endeavor ought to be): Continue reading

Add Google Maps iframe & YouTube embed to Apple Wiki Server

Apple’s Teams Wiki Server supports very few HTML tags out of the box, in order to keep things simple. But, like Any Good Unix Ought To, Mac OS X Server gives you the ability to manipulated things, such as adding iframe, embed, param, and object tags to the Wiki/Blog server. Here’s how: Continue reading