implementing PEAR feature #6396 properly (enabling PECL exts in php.ini)
| From: | Greg Beaver | Date: | Wed, 10 May 2006 04:23:22 +0000 |
| Subject: | implementing PEAR feature #6396 properly (enabling PECL exts in php.ini) | ||
| Groups: | php.pear.core php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-3767@lists.php.net to get a copy of this message | ||
Hi,
I am working on a solution for automatically enabling PECL extensions in
php.ini and came up against a shortcoming in package.xml version 2.0 and
would like to address this issue head-on.
I have 2 questions (I'll summarize and then expound):
1) Can we use the <pearinstaller> dep to exclude older installs rather
than bumping package.xml to version 2.1?
2) Any objections to adding <zendextsrcrelease> and <zendextbinrelease>
to package.xml for PECL packages that distribute zend extensions like
APC/Xdebug?
1) First of all, I am wary of moving to package.xml 2.1, as this will
simply error out with "no handlers for package.xml 2.1" upon
installation. The solution I'm hoping will solve this issue is to rely
upon the pearinstaller dependency. I just committed code that will
check this value prior to any other validation (and will be in PEAR
1.4.10), and error out with a message that says "upgrade your PEAR"
rather than the uninformative "no handlers" message. This way, we can
add tags to package.xml 2.0 without forcing a package.xml version
upgrade. Sound good?
2) Next, the issue is this:
No differentiation is made in package.xml between extensions and zend
extensions. This makes automatic enabling in package.xml impossible,
since there is no way to magically determine whether a PECL extension is
a normal one or a zend extension.
To fix this, I would like to add "zendextsrcrelease" and
"zendextbinrelease" release types to complement "extsrcrelease" and
"extbinrelease". Xdebug, for instance, would use <zendextsrcrelease> to
describe its release type (PEAR packages use <phprelease> in case this
is confusing).
Incidentally, the way extension enabling in php.ini would work is simple:
1) new config variable "php_ini" must be set to the absolute path to
php.ini:
pear config-set php_ini /etc/conf/php.ini
if it is not set, a message is displayed telling the user to enable the
extension in php.ini manually.
2) upon installation of a PECL extension that uses package.xml version
2.0, the extension will be added to php.ini if it is not already enabled
3) upon uninstallation, it will be removed from php.ini
4) patch against HEAD of pear-core implementing this is
http://pear.php.net/~greg/zendext.patch.txt
Greg