[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP Policy Draft: API version



On Mon, Apr 10, 2006 at 04:26:12PM -0400, sean finney wrote:
> my impression is that you're correct.  this seems like a much cleaner
> method to recommend as well... any seconds to change the draft?

I think I've discovered why the versions mismatch:

$ sed -ne 's/\#define PHP_API_VERSION //p' < /usr/include/php4/main/php.h
20020918
$ php-config4 --extension-dir
/usr/lib/php4/20050606
$ phpize4 -v
Configuring for:
PHP Api Version:         20020918
Zend Module Api No:      20020429
Zend Extension Api No:   20050606
$ sed -ne 's/\#define PHP_API_VERSION //p' < /usr/include/php5/main/php.h
20041225
$ php-config5 --extension-dir
/usr/lib/php5/20051025
$ phpize5 -v Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025

So PHP_API_VERSION is the "PHP Api Version" (unsuprisingly).  The
version number on the directory is the Zend Extension Api No (minus
the leading 2 in PHP5 - I guess that's to differentiate between PHP4 and
PHP5 and so isn't needed on the extension dir as that's in the
/usr/lib/phpN prefix.)

So I think the current draft is confused as to which API is relevant
here and should indeed use "php-configN --extension-dir".

While I'm here, is there an existing PHP binary module whose packaging
conforms to current "best practice" which I can use as a guide?  If
there's a better place to ask, please point me there...

Cheers,
    Olly



Reply to: