How do I compile a PHP extension with Microsoft Visual C++ 2008?
VC9 and VC6 builds are not compatible. You either have to compile your DLL with VC6 or get PHP binaries compiled with VC9 from their download page.
If you are using Apache and mod_php you will also need a VC9 build of Apache to load the VC9 PHP, you can get those from apachehaus.com.