Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57626 - USE=gd should add extension for libgd.so.x to php.ini
Summary: USE=gd should add extension for libgd.so.x to php.ini
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-19 13:13 UTC by Lina Pezzella (RETIRED)
Modified: 2004-07-19 14:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lina Pezzella (RETIRED) gentoo-dev 2004-07-19 13:13:54 UTC
JPGraph depends on gd and php.  If you emerge JPGraph it will automatically compile gd, but it will not change your use flags so that php is compiled with gd support.  This is an ebuild specific problem.

Furthermore, if USE=gd is in your useflags, you still have to add the line extension=libgd.so.x to php.ini in order to use JPGraph.  Minimally, USE=gd should automatically add that extension to php.ini, but what about people who do not have USE=gd and emerge JPGraph?

Here's a php script to test with:
<?php
ob_start();
include ("/usr/lib/php/jpgraph/jpgraph.php");
include ("/usr/lib/php/jpgraph/jpgraph_bar.php");

$data = array(5, 4, 3);
$leg = array('gongloo', 'j4rg0n', 'awesome');
$graph = new Graph(250,150,"auto");
$graph->SetScale("textint");
$graph->img->SetMargin(50,30,50,50);
$graph->xaxis->SetTickLabels($leg);

$bplot = new BarPlot($data);
$bplot->SetFillColor("lightgreen"); // Fill color
$bplot->value->Show();
$bplot->value->SetColor("black","navy");

$graph->Add($bplot);
$graph->Stroke(output.png);
ob_flush();
?>

<html>
<body><img src="output.png" /></body>
</html>

Reproducible: Always
Steps to Reproduce:
1. emerge jpgraph
2. place the script above somewhere in your document root



Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.4.25-gentoo-r2)
=================================================================
System uname: 2.4.25-gentoo-r2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apm berkdb crypt encode foomaticdb gd gdbm gif gpm gtk2 imlib java jpeg
kerberos libg++ libwww mad mpeg mysql ncurses nls oggvorbis pam perl png python
readline samba sasl sdl slang snmp spell sse ssl svga tcpd x86 xml2 zlib"
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-19 14:44:26 UTC
adding extension=libgd in php.ini is NOT the solution.
there are a number of problems like this thruout the tree, all waiting for use-flag forcing in dependancies (2.0.52 i'm told).
with PHP we try to build a monolithic PHP, as it's significently faster than having lots of shared extensions.

P.S. please do NOT assign php bugs directly to me, assign them to the php-bugs alias.