Different API Numbers for PHP Extension

So this is the case, I'm trying to develop a php extension for my clients. I use SWIG to generate shell code, and my main code is C ++. After successfully creating my extension, I upload it to / ext and restart the web server to test it. I have a bug that mentioned that the extension was built with API 20090626, but the PHP server (in my XAMPP case) API is 20100525. I fully understand the error, so I open the Zend_modules.h header file in the php source and change API number from 20090626 to 20100525, then I create an extension with the updated zend_modules.h header file, and now I have no problem.

The question is, my clients use different php servers with different APIs, and I planned to provide them with a dll (my extension), which can be easily downloaded without any problems. But now I have to give them a VS2010 solution with dynamically loading my main code (dll). I mean, each user must first check the PHP API from his server and change the header file Zend_modules.h, build a solution, and then use the extension. I need a solution that makes my extension completely independent of this API number.

I really appreciate any idea.

0
source share
1 answer

I fully understand the error, so I open the header file Zend_modules.h in the php source and change the API number from 20090626 to 20100525

, , , .

PHP - Zend API , PHP , . , PHP, , .

PHP, , PHP. , , . ( PHP, . .)

API PHP:

  • PHP 5.2: 20060613
  • PHP 5.3: 20090626
  • PHP 5.4: 20100525
  • PHP 5.5: 20120211
+3

All Articles