[CentOS-devel] [PHP 5.2.6] API definition

Thu Mar 12 20:13:28 UTC 2009
Paulo Martinez <pm at afm-koeln.de>

Am 12.03.2009 um 19:46 schrieb Remi Collet:

>> PHP Warning:  PHP Startup: mhash: Unable to initialize module\nModule
>> compiled with module API=20050922, debug=0, thread-safety=0\nPHP
>> compiled with module API=20060613, debug=0, thread-safety=0\nThese
>> options need to match\n in Unknown on line 0
>
> This should be detect before installation, not on apache start...
>
> That's why Fedora 5.2.x php package provides the new
> 	php(zend-abi) = 20060613
>
> Which should be required by all pecl extension
> /etc/rpm/macros.php (in php-devel) provides usefull macros for this.


It should be enough to specify Require/Provides-tags. As done in
php-5.2.6-2.el5s2.src.rpm and php-mcrypt (src: php-extras) via

  %define apiver xxxxxxx

php-5.2.6-2.el5s2.src.rpm defines apiver 20041225.
And here comes my question: It defines this ^^ ?

  rpm -q php-common-5.2.6-2.el5s2 --provides | grep api
  php(api) = 20041225
  php-api = 20041225

so far on rpms site. But

  php -i | grep -P 'PHP API|PHP Version'
  PHP Version => 5.2.6
  PHP API => 20041225

contrary to above log errors (API=20060613).

Anyway, it explains why ex. php-mcrypt did't bleated at
installation time about different APIs - it was satisfied.


php-mcrypt (src: php-extras) define apiver on compile time

%global apiver	%((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API  
=> //p') | tail -1)


Besides of php packages in extras repos. Is the
apiver-definition in php-5.2.6-2.el5s2 correct?


P.M.