Compile PHP extensions using Visual Studio 2008, Module ID does not match PHP

After compiling my own php extension using VC9(2008) and VC10(2010) using the next steps:

http://blog.slickedit. com/2007/09/creating-a-php-5-extension-with-visual-c-2005/

I got the next error when initializing php:

PHP Warning: PHP Startup: FirstPHPExt Module: Unable to initialize module
Module compiled with build ID=API20090626,TS
PHP compiled with build ID=API20090626,TS,VC9
These options need to match
in Unknown on line 0

Why don’t I use VC9 to compile the module?

More information:

Operating system: Windows7 x64
PHP: 5.3.3,TS,VC9

Okay, I found the solution:

You must add preprocessing in php-src / Zend / zend_build.h Constants:

#define PHP_COMPILER_ID "VC9"

It will work.

The solution is found here: http: //forums.zend.com/viewtopic.php?f=55&t=2045

Use VC9 (2008) and VC10 (2010) to compile my own PHP using the next steps After extension:

http://blog.slickedit.com/2007/09/creating-a-php-5-extension-with-visual-c-2005/

< p>I get the next error when initializing php:

PHP Warning: PHP Startup: FirstPHPExt Module: Unable to initialize module
Module compiled with build ID=API20090626, TS
PHP compiled with build ID=API20090626,TS,VC9
These options need to match
in Unknown on line 0

Why don’t I use VC9 to compile the module?

More information:

Operating system: Windows7 x64
PHP: 5.3.3,TS,VC9

Okay, I found the solution:

You must add the preprocessor constants in php-src/Zend/zend_build.h:

#define PHP_COMPILER_ID "VC9"

It will work.

The solution is found here: http://forums.zend.com/viewtopic.php? f=55&t=2045

Leave a Comment

Your email address will not be published.