NOTE: you need the same extension version (5.2.x or 5.3.0) as your PHP version, plus you need the same compiler version (only one compiler version is available for 5.2.x) plus you need the thread safe or non thread safe (NTS) version. All three - PHP version, compiler, and thread safety, must match or the extension will not load.
Cairo library builds are done with zlib and libpng supported. Win32 surfaces and fonts are enable, as well as SVG, PNG, PS, PDF, and IMAGE surfaces. The binaries used are the latest used by PHP on windows. zlib src can be found at http://www.zlib.net/. libpng src can be found at http://www.libpng.org/pub/png/libpng.html Project files for libpng and zlib can be found at pecl2 site although they are not always kept up to date. Binary builds for libpng and zlib with MSVC compatible dev files can be found at VC6, VC9, VC9-x64
The solution and dsp zip files below include cairo 1.8.8 source and pixman 0.14.0 along with the libpng and zlib static library builds - everything you need is included. There is one patch applied to both sets of source, and one patch applied only to the VC6 sources. The VC patch fixes a few build issues with VC6 (LL vs. i64) and the second patch fixes a bug in cairo_toy_font_face_create with a static build - thread stuff is not initialized before a lock is called.
I've been asked why don't I just use the build files provided with cairo. First, I don't like having to find a gnu make for windows - pure laziness on my part. Secondly the windows makefiles are NOT in any way synced with the source. And the reason I don't use mingw + msys to build VC6 compatible versions? Although dlls built that way are compatible with MSVC stuff, I've had less luck with static libraries.