Re: Re: GD extension warning when installing a package

From: Date: Thu, 24 Feb 2005 10:51:39 +0000
Subject: Re: Re: GD extension warning when installing a package
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36380@lists.php.net to get a copy of this message
On Thu, 24 Feb 2005 11:40:14 +0100, Laurent Laville <pear@laurent-laville.org> wrote: > Hi all, > > After a good night, i've finally clear ideas, and have a GOOD NEW: > I FOUND ORIGIN OF MY PROBLEM, and i'll try to explain to avoid > all PEAR developpers to get again the same problem . > > I've run lot of tests and discovered : > > if your package (to install) has a PHP extension dependency, such as GD > YOU CANNOT USE the version# compare feature; Why ? > Have a look on file Dependency.php,v 1.36.4.1 2004/12/27 07:04:19 cellog > (lines 260-277) > It's the same for PEAR 1.3.4 and 1.3.5 (i've not investigated for 1.4.0a1) > And read lines of checkExtension() method. This method is called > when install a package that has a dependency like : > > for Image_Color 1.0.1 > <dep type="ext" rel="has">gd</dep> > > for HTML_Progress 1.2.0 > <dep type="ext" rel="ge" version="2.0.1" > optional="yes">GD</dep> > > for Image_Graph 0.2.1, and Image_Tools 0.1 > <dep type="ext" rel="has" version="2">gd</dep> > > for Image_Graph 0.3.0dev4 > <dep type="ext" rel="has" > optional="no">gd</dep> > > I've a warning message because GD extension does not exists; it's gd > (TAKE CARE it's case sensitive) > > warning message is created by line 251: > 'GD' PHP extension is recommended to utilize some features > > When i try with gd in lowercase > <dep type="ext" rel="ge" version="2.0.1" > optional="yes">gd</dep> > > i get warning message created by lines 272-273 > 'gd' PHP extension version >= 2.0.1 is recommended to utilize some features > Why ? see Version compare in details made (line 267) > if (!version_compare("$ext_ver", "$req", $operator)) { > > between $ext_ver (line 264) current version of ext. gd ($name: arg #2) > $ext_ver = phpversion($name); > > and $req (method arg #3) > ( Greg, there are few typo error on this method phpdoc tags: > * missiong out arg#1 $errmsg > * mispelling arg#3 $req_ext_ver/$req > * forgot (optional) for args #3,4,5) > ) > > It's returns for my config (with windows PHP 4.3.10) > $name = 'gd'; > $ext_ver = phpversion($name); > $php_ver = phpversion(); > > var_dump($php_ver); ==> string(6) "4.3.10" > var_dump($ext_ver); ==> boolean(false) > > probably a PHP bug ?! > > So with dep > <dep type="ext" rel="ge" version="2.0.1" > optional="yes">gd</dep> > > PEAR will compare extension with versions 2.0.1 and boolean false > ==> result is false > > TO RESUME: > 1. do not use version compare feature (rel="ge") with PHP extension > 2. respect case (lowercase) > > the right line to code is > <dep type="ext" rel="has">gd</dep> > and not : > <dep type="ext" rel="ge" version="2.0.1" > optional="yes">GD</dep> > or > <dep type="ext" rel="has" version="2">gd</dep> > > BTW in the last case the problem is not seen because, > checkExtension() method stop to compare (line 258) with a rel="has" > > I hope it will clear the situation, and help all of you to avoid > such problem in future ! > > regards > Laurent Laville > > Firman Wandayandi a écrit : > > On Wed, 23 Feb 2005 17:54:06 +0100, Laurent Laville > > <laurent.laville@worldonline.fr> wrote: > > > >>No i've not tried this with PEAR 1.4.0a1 or even 1.3.5 > >>I'm still on PEAR 1.3.4 and i'll stay sometimes again . > >> > >>Sorry Greg, i've to stop my tests, i've to go soon . > >>BTW thanks for all your tips (i've not in minds) > >> > >>Laurent > >> > >>Greg Beaver a écrit : > >> > >> > >>>Laurent Laville wrote: > >>> > >>> > >>>>I've also try to change my pear.bat (last line as follow) > >>>> > >>>>"%PHP_PEAR_PHP_BIN%" -C -c php.ini -d output_buffering=1 -d > >>>>include_path="%PHP_PEAR_INSTALL_DIR%" -f > >>>>"%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9 > >>>> > >>>>Notice the -c php.ini > >>>>with locations: > >>>>pear.bat and php.ini into e:\wamp\php4 > >>>> > >>>>But its stay the same pb, always the warning about GD ! > >>> > >>> > >>> > >>>Have you tried this with PEAR 1.4.0a1? > >>> > >>>Greg > >>> > >> > >>-- > >>PEAR Development Mailing List (http://pear.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > Uh, i got some stuff accidentically, if we run php on console, PHP > > looking for php.ini at the working directory first and the SYSTEMROOT. > > > > Seem this problem still not found a solution, what happened with > > Laurent's PEAR. Why must be GD, i think Laurent should be test another > > package that depend on another extension (No GD), we clearing this > > situation, that is a PEAR bug or what? > > > > BTW, take care yourself Laurent, happy travelling! Do some test again > > when you come back. > > > > OK, well done Laurent! I think this problem is clear now. -- .:: OrangEnigmA : Never Dreamt Before ::.

« previous php.pear.dev (#36380) next »