Subject: pkg/32934: PHP - problems with pear install & gd dependancy
To: None <firstname.lastname@example.org, email@example.com,>
From: Dave Tyson <firstname.lastname@example.org>
Date: 02/26/2006 14:55:00
>Synopsis: PHP - problems with pear install & gd dependancy
>Arrival-Date: Sun Feb 26 14:55:00 +0000 2006
>Originator: Dave Tyson
>Release: NetBSD 2.1_STABLE
The University of Liverpool
System: NetBSD napoleon 2.1_STABLE NetBSD 2.1_STABLE (LIVSTD) #3: Fri Nov 4 15:06:23 GMT 2005 email@example.com:/usr/obj/sys/arch/i386/compile/LIVSTD i386
After installing php & php-gd successfully, attempts to use the pear command to
install modules which depend on gd fail because the pear command invokes php
with the -n option which disables scanning php.ini. Because of this pear install
fails to note that gd is installed and refuses to add components depending on gd.
The system has the following php / graphics packages installed
phpinfo shows gd is installed correctly (both from the command line and web
Trying to use pear to install Image_Color gives the following error:
root(napoleon)htdocs$ pear install Image_Color
downloading Image_Color-1.0.2.tar ...
Starting to download Image_Color-1.0.2.tar (-1 bytes)
.........done: 33,792 bytes
'gd' PHP extension is not installed
Image_Color: Dependencies failed
A quick & dirty fix is to edit the pear script change the line invoking
php to remove the -n option.
Jonny Lam notes that:
"The CVS history for www/php4/patches/patch-al, which adds the "-n",
completely ignore system php.ini for all pear-related operations;
this is necessary to avoid being subject to e.g. open_basedir or
I'm guessing that this is because jdolocek didn't want any user settings
to affect the installation of various PEAR modules by the php4 package.
However, in your case, this causes the php_gd.so to not be loaded, which
is apparently needed by the Image_Color PEAR module."
A possible 'correct' fix would be to maintain a separate 'install.php'
file which is initialised when php is installed and updated when other
php components like php-gd & php-mysql are added/removed. This could
then be referenced by pear to find out what modules are installed rather
than rely on the main php.in file which may be changed by the user.