Re: cvs: php4 /pear/PEAR Dependency.php

From: Date: Mon, 17 Jun 2002 20:50:34 +0000
Subject: Re: cvs: php4 /pear/PEAR Dependency.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4666@lists.php.net to get a copy of this message
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

« previous php.pear.cvs (#4666) next »