Re: cvs: php4 /pear/PEAR Dependency.php
| From: | Tomas V.V.Cox | Date: | Mon, 17 Jun 2002 21:18:49 +0000 |
| Subject: | Re: cvs: php4 /pear/PEAR Dependency.php | ||
| References: | 1 2 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-4667@lists.php.net to get a copy of this message | ||
That makes me think on the problem of in what order would we load the
extensions to test, when an extension depends on another.
Tomas V.V.Cox
"Stig S. Bakken" wrote:
>
> Made me think of a problem Rasmus and I had at LinuxTag: he wanted to
> install xmms 0.2 on his laptop, which had PHP linked with the kerberos
> libs. Unforuntely, there is a runtime symbol clash between gtk and
> kerberos, which made the installer die in a strange way when trying to
> load the php_gtk extension (which the xmms package depends on).
>
> It's a pretty obscure combination, but it's not the first time and it
> won't be the last time that there are runtime conflicts like this. The
> only thing we can do to ward against it is to load the library in a
> separate php binary. Now that we have the pcntl extension we can even
> do it pretty quickly (fork with no exec). Just something to keep in
> mind.
>
> - Stig
>
> On Mon, 2002-06-17 at 15:50, Tomas V.V.Cox wrote:
> > cox Mon Jun 17 09:50:33 2002 EDT
> >
> > Modified files:
> > /php4/pear/PEAR Dependency.php
> > Log:
> > Use the new PEAR::loadExtension() in checkExtension() instead
> > of the "hack"
> >
> >
> > Index: php4/pear/PEAR/Dependency.php
> > diff -u php4/pear/PEAR/Dependency.php:1.11 php4/pear/PEAR/Dependency.php:1.12
> > --- php4/pear/PEAR/Dependency.php:1.11 Thu May 23 16:37:58 2002
> > +++ php4/pear/PEAR/Dependency.php Mon Jun 17 09:50:33 2002
> > @@ -17,7 +17,7 @@
> > // | Stig Bakken <ssb@fast.no> |
> > // +----------------------------------------------------------------------+
> > //
> > -// $Id: Dependency.php,v 1.11 2002/05/23 20:37:58 cox Exp $
> > +// $Id: Dependency.php,v 1.12 2002/06/17 13:50:33 cox Exp $
> >
> > /**
> > * Methods for dependencies check. Based on Stig's dependencies RFC
> > @@ -134,11 +134,8 @@
> > function checkExtension($name, $req = null, $relation = 'has')
> > {
> > // XXX (ssb): could we avoid loading the extension here?
> > - if (!extension_loaded($name)) {
> > - $dlext = OS_WINDOWS ? '.dll' : '.so';
> > - if (!@dl($name . $dlext)) {
> > - return "'$name' PHP extension is not installed";
> > - }
> > + if (!PEAR::loadExtension($name)) {
> > + return "'$name' PHP extension is not installed";
> > }
> > if ($relation == 'has') {
> > return false;
> >
> >
> >
> > --
> > PEAR CVS Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> --
> Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway
> http://pear.php.net/wishlist.php/ssb
>
> --
> PEAR CVS Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php