By Matt Butcher
mamp
PHP 5 Runkit for MAMP 1.7.2
Submitted by matt on Sun, 2009-03-15 19:31Ever tried to get PHP's Runkit PECL extension running on the popular MAMP stack for Mac OS X? If you have tried, you will understand why it is difficult. There are two roadblocks that must be overcome before Runkit can be installed.
The first has to do with MAMP itself. While MAMP provides most of the tools that a web developer needs, it is generally incapable of dealing with PECL builds. The reason for this is simple: MAMP does not ship with header files for PHP. That means that extensions built from C source files cannot successfully compile. That is a problem.
The second difficulty has to do with Runkit, which (being basically feature complete) hasn't undergone a major revision in a couple of years. The official released version, in fact, will not run on PHP 5.2. Yes, that is the version that ships with MAMP. To get the fixed version, you will need to check out the latest source code from PHP.net's CVS repository and build it yourself.
Recently, I found a situation that demanded Runkit. (Okay, it might have been a contrived situation.) To accomplish the goal of my project, I built Runkit from source. If you want it, the runkit.so file is attached at the end of this post.








