php5-gd not using bundled GD library

Bug #74647 reported by Peter
208
This bug affects 32 people
Affects Status Importance Assigned to Milestone
mantis
Fix Released
Unknown
php
Fix Released
Undecided
Unassigned
php5 (Debian)
Fix Released
Unknown
php5 (Ubuntu)
Won't Fix
Undecided
Unassigned
Declined for Karmic by Chuck Short
Declined for Lucid by Chuck Short
Declined for Maverick by Sebastien Bacher

Bug Description

As you are probably aware, PHP has bundled an upgraded GD library for some time, which supports image rotation, convolution and alpha blending. The package php5-gd still uses Boutell's version of the library, which restricts the abilities of the PHP module.

It would be great if future versions of php5-gd can be built against PHP's GD library in order that the GD module can be used to its greatest extent.

Revision history for this message
In , Steve Langasek (vorlon) wrote : Re: [php-maint] Bug#321237: php5-gd: not using gd bundled with php5

On Thu, Aug 04, 2005 at 12:14:23PM +0200, Rob Halff wrote:
> Package: php5-gd
> Version: 5.0.4-3
> Severity: wishlist

> gd seems to build with an external gd library,
> php5 has it's own gd library shipped with it.

> One functions that isn't available when gd is build with an external lib
> is ImageRotate();

> This function is probably used a lot (I use it) and there is no real
> reason to not use the gd library bundled with php I think.

Yes, there is. Bundled libraries are a pain in the ass for security
support.

> So It would be nice if the bundeled gd lib is used instead of the
> external debian one. If this is not possible try to patch it maybe so
> php still knows about the ImageRotate() function.

It would be nice if PHP would contribute their GD changes upstream so that
this isn't an issue.

--
Steve Langasek
postmodern programmer

Revision history for this message
Peter (peter-md) wrote :

As you are probably aware, PHP has bundled an upgraded GD library for some time, which supports image rotation, convolution and alpha blending. The package php5-gd still uses Boutell's version of the library, which restricts the abilities of the PHP module.

It would be great if future versions of php5-gd can be built against PHP's GD library in order that the GD module can be used to its greatest extent.

Revision history for this message
In , sean finney (seanius) wrote : php5 misc housecleaning

forwarded 401525 http://bugs.php.net/bug.php?id=39400
# we're now using php imap from the main trunk.
close 389384 5.2.0-5
# zip functions now available
close 367159 5.2.0-5
# we'll never use the bundled gd
tags #321237 wontfix
# we're leaving this setting on
tags #399258 wontfix
thanks

that's all folks

Revision history for this message
Simone F. (fittabile) wrote :

Confirmed, the imagerotate() function in fact doesn't work.

Revision history for this message
Manoel B H Carvalho (manoelhc) wrote :

I already have many problems without imagerotate(). Drupal and others CMS needs too.

Revision history for this message
Paul Sladen (sladen) wrote :

Matthew Nuzum: have you hit this during setting up Drupal on the main Ubuntu website? Does it ring any bells?

Revision history for this message
Chris (mail-christianvollrath) wrote :

Confirmed, the imagerotate() function in fact doesn't work.

Changed in php5:
status: Unconfirmed → Confirmed
Revision history for this message
Kelsey Sigurdur (kes) wrote :

imagelayereffect() is undefined as well.

Revision history for this message
Kelsey Sigurdur (kes) wrote :

For what it's worth I extracted gd-bundled.so from the following mandriva RPM, copied it to the modules directory, then uninstalled the php5-gd package, and it appears to work on Feisty with PHP 5.2.1.

ftp://fr2.rpmfind.net/linux/MandrakeCooker/2007.1/i586//media/main/updates/php-gd-5.2.1-1.1mdv2007.1.i586.rpm

php -r "var_dump(function_exists('imagerotate'));"
bool(true)

php -r "var_dump(function_exists('imagelayereffect'));"
bool(true)

I haven't tested it with apache, just the cli.

Revision history for this message
Ondřej Surý (ondrej) wrote :

Using bundled libraries is security hell. It will never happen in Debian. And I very much doubt that it will happen in Ubuntu.

Correct way is to push those changes to upstream GD library. And it's a WIP at least according to http://www.libgd.org/FAQ_PHP#How_do_I_get_gd_to_work_with_PHP.3F

Revision history for this message
In , Steffen Ille (steffen-steffen-ille) wrote : php5-gd missing some internal functions
Download full text (5.5 KiB)

debian type: testing
package: php5-gd
version: 5.2.3-1+lenny1

problem-description:
the debian package of gd is missing some functions, which are present in
the php bundled version of this library. for example the imagerotate()
and imagefilter() function.

in addition to bug #321237 i do not want to have the debian-package
using the bundled library, but i want to indicate, that the version is
not fully featured and so not fully usable. this should be fixed an the
missing functions should be added to the debian library-package.
this is the output of the featured functions in this package-version:

php --re gd | grep "Function"
    Function [ <internal:gd> function gd_info ] {
    Function [ <internal:gd> function imagearc ] {
    Function [ <internal:gd> function imageellipse ] {
    Function [ <internal:gd> function imagechar ] {
    Function [ <internal:gd> function imagecharup ] {
    Function [ <internal:gd> function imagecolorat ] {
    Function [ <internal:gd> function imagecolorallocate ] {
    Function [ <internal:gd> function imagepalettecopy ] {
    Function [ <internal:gd> function imagecreatefromstring ] {
    Function [ <internal:gd> function imagecolorclosest ] {
    Function [ <internal:gd> function imagecolorclosesthwb ] {
    Function [ <internal:gd> function imagecolordeallocate ] {
    Function [ <internal:gd> function imagecolorresolve ] {
    Function [ <internal:gd> function imagecolorexact ] {
    Function [ <internal:gd> function imagecolorset ] {
    Function [ <internal:gd> function imagecolortransparent ] {
    Function [ <internal:gd> function imagecolorstotal ] {
    Function [ <internal:gd> function imagecolorsforindex ] {
    Function [ <internal:gd> function imagecopy ] {
    Function [ <internal:gd> function imagecopymerge ] {
    Function [ <internal:gd> function imagecopymergegray ] {
    Function [ <internal:gd> function imagecopyresized ] {
    Function [ <internal:gd> function imagecreate ] {
    Function [ <internal:gd> function imagecreatetruecolor ] {
    Function [ <internal:gd> function imageistruecolor ] {
    Function [ <internal:gd> function imagetruecolortopalette ] {
    Function [ <internal:gd> function imagesetthickness ] {
    Function [ <internal:gd> function imagefilledarc ] {
    Function [ <internal:gd> function imagefilledellipse ] {
    Function [ <internal:gd> function imagealphablending ] {
    Function [ <internal:gd> function imagesavealpha ] {
    Function [ <internal:gd> function imagecolorallocatealpha ] {
    Function [ <internal:gd> function imagecolorresolvealpha ] {
    Function [ <internal:gd> function imagecolorclosestalpha ] {
    Function [ <internal:gd> function imagecolorexactalpha ] {
    Function [ <internal:gd> function imagecopyresampled ] {
    Function [ <internal:gd> function imagesettile ] {
    Function [ <internal:gd> function imagesetbrush ] {
    Function [ <internal:gd> function imagesetstyle ] {
    Function [ <internal:gd> function imagecreatefrompng ] {
    Function [ <internal:gd> function imagecreatefromgif ] {
    Function [ <internal:gd> function imagecreatefromjpeg ] {
    Function [ <internal:gd> function imagecreatefromwbmp ] {
    Function [ <i...

Read more...

Revision history for this message
Martin Atkins (martin-atkins-azuragroup) wrote :

Since the PHP guys have effectively forked GD, in the interim would it not be acceptable to provide the PHP version of GD as a separate package, and then have php5-gd depend on the standard gd *or* the PHP gd?

Eventually, once the fork has been healed (I'm not holding my breath!) the separate package can presumably just become an alias for the standard GD so that upgrades will switch to the standard version.

Revision history for this message
Abel Cheung (abelcheung) wrote :

People wishing to use php with bundled gd immediately should switch to other distribution. For anybody who understand how Debian / Ubuntu works, Ondřej has given the ultimate answer. For those unwilling to change, please place your bet, ranging from one day to one century.

Revision history for this message
In , Maxxer (lorenzo-milesi) wrote : workaround

Possible workaround, for people wishing to have imagerotate:
http://blog.madtech.cx/2006/12/08/debian-etch-libapache2-mod-php5-with-bundled-libgd-gdlib/

-- 
Lorenzo Milesi - <email address hidden>

YetOpen S.r.l. - http://www.yetopen.it/
C.so E. Filiberto, 74 23900 Lecco - ITALY -
Tel 0341 220 205 - Fax 178 607 8199

GPG/PGP Key-Id: 0xE704E230 - http://keyserver.linux.it

Revision history for this message
Luis Villa (luis-villa) wrote :

Ah, yes, because there are no bundled libraries in Debian/Ubuntu... I mean, besides the bazillion copies of zlib or sqlite alone, just like every other distro. C'mon.

Yes, in general it is very good policy not to build with bundled libraries. But that policy needs to have exceptions, like any reasonable policy. It isn't like you're dealing with a fly-by-night organization here, and you're dealing with some fairly substantial functionality that is missing. (Not rotating pictures automatically? It is 2008 already.)

Revision history for this message
Ondřej Surý (ondrej) wrote :

If there is zlib/sqlite library bundled anywhere it needs fixing.

But splitting php-forked gd library to separate package seems to be reasonable idea - if somebody is willing to check for security bugs (both gd and php-gd). And if this package gets accepted to Debian (which may be a slight problem) I am willing to make the switch. And I think that sean will not oppose either. But it needs a maintainer who will really care of the package and not just package it for sake of php and immediatelly forgots about it.

Revision history for this message
Pierre (pierre-php) wrote :

hi!

I already tried to discuss the various problem in Debian's gd last year before Etch. Without much success as some critical bugs only got fixed recently and not by the package maintainer (he should be consider as inactive or as blocking point, choose one ;) ).

About the PHP'gd, I'm working on a patch to enable external GD usage in ext/gd while enabling the missing features (rotate, filter, etc.). It will be applied only to php 5.3+ but it should be easy to back port it to 5.2.x in your trees. However the minimum GD version will be 2.0.36 or 2.0.36 (that excludes Debian's version as there is still important bugs and BC issues in their trees).

In the long run (gd 2.1+), both libraries will be identical from a feature and API point of view.

As an ubuntu user (and lover), I will be happy to give you a hand to solve this problem.

Cheers,
--
Pierre

http://www.libgd.org

Revision history for this message
Pierre (pierre-php) wrote :

"will be 2.0.36 or 2.0.36" > "will be 2.0.35 or 2.0.36" :)

Revision history for this message
Murz (murznn) wrote :

I have found a manual how to recompile the PHP for using bundled GD library:
http://cumu.li/2008/5/13/recompiling-php5-with-bundled-support-for-gd-on-ubuntu

Revision history for this message
John Pye (jdpipe) wrote :

This bug has been hanging around for a long time :-(

FYI this bug impacts on the Mantis bug tracker; there is a workaround:
http://www.mantisbt.org/bugs/view.php?id=9167

Changed in php:
status: Unknown → Fix Released
Changed in mantis:
status: Unknown → Fix Released
Revision history for this message
In , B Wooster (bwooster47) wrote : Please document shortcoming in bundle

This is a serious problem - very hard to figure out as as google
search shows (some people still deluded that php-gd fixes this gd
problem).

While the religious arguments are debatable, in the end, users are
left with diminished functionality and nowhere does the PHP-GD package
description mention that it is incomplete and will not work like other
php installs on other distributions.

Can someone please do at least two of these things:
1) document that php-gd is missing a large number of functions PHP
users might need
2) would be really great if a php-gd-alternate (or call it unsecure if
you wish) was built (or a php-with-gd-alternate) was available, so
users could decide if they want to pick the debian-blessed version, or
another version. Is there some other debian packager already doing
this, by any chance? That would be great.

Revision history for this message
In , sean finney (seanius) wrote : Re: [php-maint] Bug#321237: Please document shortcoming in bundle

hi b,

On Thu, Aug 27, 2009 at 08:49:57AM -0400, B Wooster wrote:
> 1) document that php-gd is missing a large number of functions PHP
> users might need

how about you provide a list of what's missing? this would be very
informative to have.

> 2) would be really great if a php-gd-alternate (or call it unsecure if
> you wish) was built (or a php-with-gd-alternate) was available, so
> users could decide if they want to pick the debian-blessed version, or
> another version. Is there some other debian packager already doing
> this, by any chance? That would be great.

no, and i doubt anyone is that interested. even if we did, it would be
veto'd by the security and ftp-master teams because debian has a fairly
strict policy/practice of not building against "embedded copies" of
software. this is not a "religious issue" as you suggest; there is a
sound technical argument why debian as a distribution can't take this
approach.

the closest you could get to what you're asking is some kind of way to
hint to debian/rules that you want the embedded copy at buildtime (similar
to what we do already with PHP_COMPAT, or even just use the same variable
if it seems appropriate), and then build the packages yourself from
the source package.

but ultimately the real problem is that the "missing" changes which
provide these features in the "bundled" gd library shipped in PHP never
found their way to the "official" gd sources, which debian uses for libgd.
of course the "official" libgd hasn't seen a new release in closing
on two years, and in fact they've been taken over by the php project
(but still the local php changes have not been synchronized).

there's been a secondary problem of the debian gd maintainer and the
"upstream" gd maintainer (who is a php developer) not getting along very
well, but i'd rather not get caught up in that.

in closing, there are really only two options for moving forward:

1) come up with a list of the missing features/functionality, and ship it
   in README.Debian. There could also be some instructions for how someone
   could build the php5 packages with the embedded libgd.

2) convince the folks working on libgd (upstream) to roll a new release
   with the missing features synchronized in, and then convince the debian
   maintainer to update to the latest upstream version. or alternatively
   just identify the fixes and submit them as patches to both upstream and
   the debian maintainer--this will likely move things a bit quicker.

 sean

Revision history for this message
In , B Wooster (bwooster47) wrote :

On Thu, Aug 27, 2009 at 10:49 AM, sean finney<email address hidden> wrote:
>
> how about you provide a list of what's missing?  this would be very
> informative to have.

PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) has the following
functions that are missing from Debian/Ubuntu 9.04 Jaunty:

function imageantialias
function imagecolormatch
function imageconvolution
function imagecreatefromxbm
function imagecreatefromxpm
function imagefilter
function imagelayereffect
function imagerotate
function imagexbm

> software.  this is not a "religious issue" as you suggest; there is a
> sound technical argument why debian as a distribution can't take this
> approach.

Well, could we not consider the GD inside PHP some other package? Call
it "GE" or "GC". Just happens to be compatible with GD. After all, the
intent of open source is to allow forks, so just consider it a fork.

But that is all debatable. Debian authorized archives are certainly
free to choose their versions.
Would be so much easier on users, though, if such archives clearly
said "well, there are quite a few functions documented on php.net that
won't really work on a Debian-authorized LAMP stack"

> in closing, there are really only two options for moving forward:
>
> 1) come up with a list of the missing features/functionality, and ship it
>   in README.Debian.  There could also be some instructions for how someone
>   could build the php5 packages with the embedded libgd.

Inside a README won't help most users - sure, after a few days they
will figure it out, but would be nice if something more prominent was
mentioned right when we do a "apt-get install"
or similar.
php.net loudly documents " Note: This function is only available if
PHP is compiled with the bundled version of the GD library." on these
functions.
So, a similar warning could be placed on the Debian php5-gd " Note:
All PHP functions that require bundled version of the GD library will
not work using this package".

> 2) convince the folks working on libgd (upstream) to roll a new release
>   with the missing features synchronized in, and then convince the debian
>   maintainer to update to the latest upstream version.  or alternatively
>   just identify the fixes and submit them as patches to both upstream and
>   the debian maintainer--this will likely move things a bit quicker.

This I presume will not happen given the personalities and issues
involved! So us users have to do the best we can - just need things
named correctly so we can pick the right thing!

>        sean

Here's a nice explanation of what has to be done :
http://drupal.org/node/134331#comment-1120427
Much better than compiling from source - since compiling means having
to patch manually, etc, while there is a greater chance that external
archives (like dotdeb) might keep their versions up to date.

Revision history for this message
gagarine (gagarine) wrote :

What's the status of this bug now?? A lot of PHP script need the bundled GD library. Drupal for exemple with image cache... And the quality is realy poor with the official GD.

I use ubuntu-serv and and don't would like recompile PHP for something basic like that!

tags: added: drupal
tags: added: apache gd
tags: added: php
Revision history for this message
gagarine (gagarine) wrote :
Revision history for this message
gagarine (gagarine) wrote :

And why not create two php packages? "php5-standard" compiled without any special options and "php5-extra" (compiled with gd and perhaps other stuff).

For example: Drupal V.7 need php with bundled GD library because the imagecache will be in the core of Drupal... so he can depend of php5-extra instate of php5-standard.

Revision history for this message
gagarine (gagarine) wrote :

Mantis don't use anti aliasing any more to work around this bug. This is not applicable for all PHP project.

Changed in php:
importance: Unknown → Undecided
status: Fix Released → New
status: New → Confirmed
Revision history for this message
Pierre (pierre-php) wrote : Re: [Bug 74647] Re: php5-gd not using bundled GD library

hi,

As of 5.3.0 it is possible to compile php with the external GD while
keep having the new features (most of them at least, like imagerotate
or imagefilter). That won't fix the non fixed bugs in debian's gd or
the bad patches (afair, it affects only debian, ubuntu being smarter
when it comes to sec fixes) but it will at least give the ubuntu users
all the features they are expecting.

Cheers,

On Tue, Sep 15, 2009 at 2:40 PM, gagarine <email address hidden> wrote:
> And why not create two php packages?  "php5-standard" compiled without
> any special options and "php5-extra" (compiled with gd and perhaps other
> stuff).
>
> For example: Drupal V.7 need php with bundled GD library because the
> imagecache will be in the core of Drupal... so he can depend of
> php5-extra instate of php5-standard.
>
> --
> php5-gd not using bundled GD library
> https://bugs.launchpad.net/bugs/74647
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Pierre

http://blog.thepimp.net | http://www.libgd.org

Revision history for this message
Ondřej Surý (ondrej) wrote :

> And why not create two php packages? "php5-standard" compiled without any special options and "php5-extra" (compiled with gd and perhaps other stuff).

Bundled GD library in php has hardcoded dependency on php, which just adds to reasons, why it couldn't be packaged as a standalone library.

What we really need is a proper fork of libgd with active upstream.

The situation is that we have "official" libgd which had last release in 2007, and bundled "libgd" in php, which doesn't have proper versioning, proper soname, and basically it's useless for everybody except PHP project.

So unless proper fork with (at least) backwards API (not ABI) compatibility is made, it's almost useless to ask.

Revision history for this message
Pierre (pierre-php) wrote :

hi,

You are still not getting it.

What you need is not a fork but a proper package. To ease this move I
added the possibility to use the system library AND to have the php
specific features like the imagefilter or imagerotate functions.

In the long run this compatibility layer will be pointless as
lilbgd.org's gd will have these features as well (gd 2.1) but that
won't make it into 5.3 or 5.2. However the compatibility layer can be
easily backported to your packages.

Feel free to come back to me if you need help on this task,

Cheers,

On Tue, Sep 15, 2009 at 5:11 PM, Ondřej Surý <email address hidden> wrote:
>> And why not create two php packages? "php5-standard" compiled without
> any special options and "php5-extra" (compiled with gd and perhaps other
> stuff).
>
> Bundled GD library in php has hardcoded dependency on php, which just
> adds to reasons, why it couldn't be packaged as a standalone library.
>
> What we really need is a proper fork of libgd with active upstream.
>
> The situation is that we have "official" libgd which had last release in
> 2007, and bundled "libgd" in php, which doesn't have proper versioning,
> proper soname, and basically it's useless for everybody except PHP
> project.
>
> So unless proper fork with (at least) backwards API (not ABI)
> compatibility is made, it's almost useless to ask.
>
> --
> php5-gd not using bundled GD library
> https://bugs.launchpad.net/bugs/74647
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Pierre

http://blog.thepimp.net | http://www.libgd.org

Revision history for this message
Ondřej Surý (ondrej) wrote :

Pierre, no I am not getting it.

Webpages www.libgd.org seems to be dead, so if you call it fork or proper package, it doesn't really matter, if the library has a upstream maintainer. If you took over maintainership of libgd, maybe it's time to write some roadmap, or at least something into news.

Anyway I would happily add your compatibility patch to 5.2.11, if you can prepare isolated patch.

Ondrej

Revision history for this message
Pierre (pierre-php) wrote :

hi,

On Fri, Sep 18, 2009 at 11:00 AM, Ondřej Surý <email address hidden> wrote:
> Pierre, no I am not getting it.
>
> Webpages www.libgd.org seems to be dead, so if you call it fork or
> proper package, it doesn't really matter, if the library has a upstream
> maintainer. If you took over maintainership of libgd, maybe it's time to
> write some roadmap, or at least something into news.

It is not dead, watch the commits. We are focusing on 2.1 release.

> Anyway I would happily add your compatibility patch to 5.2.11, if you
> can prepare isolated patch.

I won't have the time to do it. It is in 5.3, if only 5.3 had made it
to the last release. However it could be a definitive *huge* plus for
your users to finally have something usable for gd and php.

Cheers,
--
Pierre

http://blog.thepimp.net | http://www.libgd.org

Revision history for this message
Ondřej Surý (ondrej) wrote :

> It is not dead, watch the commits. We are focusing on 2.1 release.

That's indeed a good news. Thanks for the heads up.

> I won't have the time to do it. It is in 5.3, if only 5.3 had made it
> to the last release. However it could be a definitive *huge* plus for
> your users to finally have something usable for gd and php.

I'll try to poke other Debian maintainers. Although if you could pinpoint related CVS commit, it would be great.

BTW: are you aware that 5.3.0 has broken compatibility layer? probably you are, if not ping me, I'll send you a patch.

Revision history for this message
Pierre (pierre-php) wrote :

On Fri, Sep 18, 2009 at 6:55 PM, Ondřej Surý <email address hidden> wrote:
>> It is not dead, watch the commits. We are focusing on 2.1 release.
>
> That's indeed a good news. Thanks for the heads up.
>
>> I won't have the time to do it. It is in 5.3, if only 5.3 had made it
>> to the last release. However it could be a definitive *huge* plus for
>> your users to finally have something usable for gd and php.
>
> I'll try to poke other Debian maintainers. Although if you could
> pinpoint related CVS commit, it would be great.
>
> BTW: are you aware that 5.3.0 has broken compatibility layer? probably
> you are, if not ping me, I'll send you a patch.

Does it? Let me know if yes, I will fix asap as we are in the 5.3.1
release phase :)

Cheers,
--
Pierre

http://blog.thepimp.net | http://www.libgd.org

Revision history for this message
totsubo (jc-imbeault) wrote :

Soon this bug report will have been opened for three years ...

Revision history for this message
Pierre (pierre-php) wrote :

php 5.3 allows external GD while still providing the latest features
using the bundled GD library. As soon as ubuntu provides 5.3, this bug
should be fixed as well.

On Tue, Dec 22, 2009 at 1:27 PM, totsubo <email address hidden> wrote:
> Soon this bug report will have been opened for three years ...
>
> --
> php5-gd not using bundled GD library
> https://bugs.launchpad.net/bugs/74647
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Pierre

http://blog.thepimp.net | http://www.libgd.org

Revision history for this message
In , Ondřej Surý (ondrej) wrote : #321237: php5-gd: not using gd bundled with php5

found 321237 5.2.12.dfsg.1-2
notfixed 321237 5.2.12.dfsg.1-2
fixed 321237 5.3.1-2
thank you

--
Ondřej Surý <email address hidden>
http://blog.rfc1925.org/

Revision history for this message
James Andrewartha (trs80) wrote :

Debian sid has php 5.3, so this will probably be fixed after lucid is released and the packages resynced.

Revision history for this message
Chuck Short (zulcss) wrote :

This has been fixed for lucid.

Regards
chuck

Revision history for this message
Mathias Gug (mathiaz) wrote :

php 5.3.1-5ubuntu1 is in lucid.

Changed in php5 (Ubuntu):
status: Confirmed → Fix Released
Changed in php:
status: Confirmed → Fix Released
Changed in php5 (Debian):
status: Unknown → Won't Fix
Revision history for this message
Joe Terranova (joeterranova) wrote :

I see that this is marked as fix released, but I'm still having this issue with Lucid. I'm running php5 and php5-gd with version 5.3.2-1ubuntu4. I have gd loaded, the rest of the gd functions work, but I get function not found for imageantialias.

If I'm a fluke, that's fine, I'd appreciate some insight as to what I'm missing. But I'd like to see if this is still working for anyone else.

Revision history for this message
Michael Walston (mwalston) wrote :

This problem still exists for me in lucid also.

Revision history for this message
MareceK (marecek) wrote :

Same problem with lucid & php5.3.2-1ubuntu4.2

Revision history for this message
Joe Terranova (joeterranova) wrote :

Multiple people have confirmed that this is still not working. If we are missing something, please let us know when you change this back to fix released.

Changed in php5 (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Pierre (pierre-php) wrote : Re: [Bug 74647] Re: php5-gd not using bundled GD library

hi,

Which release is it? Latest php 5.3 allows to use external libraries
while keeping the bundled features active.

Cheers,

On Sat, May 29, 2010 at 8:03 PM, Joe Terranova <email address hidden> wrote:
> Multiple people have confirmed that this is still not working. If we are
> missing something, please let us know when you change this back to fix
> released.
>
> ** Changed in: php5 (Ubuntu)
>       Status: Fix Released => Confirmed
>
> --
> php5-gd not using bundled GD library
> https://bugs.launchpad.net/bugs/74647
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

Revision history for this message
Ward Loockx (ward-loockx) wrote :

Currently having this problem too on lucid

Revision history for this message
mrl586 (mrl586) wrote :

I notice this bug in maverick.

Revision history for this message
Jaap-Willem Dooge (japydooge) wrote :

Will this ever become available for Hardy Heron without having to compile php by hand?

Revision history for this message
Ondřej Surý (ondrej) wrote :

> Will this ever become available for Hardy Heron without having to compile php by hand?

No. This feature is available only in 5.3.0+ version of php5.

Revision history for this message
Jaap-Willem Dooge (japydooge) wrote :

Thanks for the infos, then we need a new server installation :-)

Revision history for this message
Milen Velikov (neosofti) wrote :
Revision history for this message
Ondřej Surý (ondrej) wrote :

> https://launchpad.net/~neosofti/+archive/experimental with enabled GD library

Could you please at least rename the package to something like php5-gd-bundled (with Provides: php5-gd, Replaces: php5-gd, Conflicts: php5-gd), so the bug reports for this package doesn't end up in the official tracker. It's very easy just recompile something, but you need to take care of the affected environment as well.

Revision history for this message
Chuck Short (zulcss) wrote :

As with debian this is something we are not going to do.

Changed in php5 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
RedScourge (redscourge) wrote :

I installed PHP 5.2.X on Lucid which normally comes with 5.3.X as I have old code I cannot yet change.

This lead to a headache recompiling PHP with the proper GD library because libaprutil1-dev and apache2-prefork-dev depend on their respective non-dev packages, so in order to satisfy the dependencies necessary for recompiling this older version of PHP, you have to download .deb files for these two packages, modify /etc/apt/sources.list back so it uses karmic instead of lucid as you usually have to do in order to install the PHP 5.2.X packages from karmic, install all OTHER dependencies, change /etc/apt.sources.list back, force install of these .deb packages with dpkg --force-depends -i [packagename], THEN you can compile, then you can uninstall all this crap it installed to compile, and THEN you can replace your currently running version of php5-gd with your newly compiled php5-gd .deb file (as altering and recompiling the source package also compiles all the subpackages as well). I mentioned most if not all of the commands I ran in order to accomplish this under bug #809400 incase any of you don't know how to do all this and need some help figuring it out.

Revision history for this message
RedScourge (redscourge) wrote :

would be awesome if this would be done, or if an optional php5-gd-boutell package could be created that does this. I know this would work, because I am currently running the default php5 package from karmic and only had to swap in my recompiled php5-gd package, php5-gd_5.2.10.dfsg.1-2ubuntu6.10_amd64.deb

Changed in php5 (Debian):
status: Won't Fix → Fix Released
Revision history for this message
Ralf Naujokat (ubuntu-ralf-naujokat) wrote :

FIrst post on this was 2005...
In 2013 it is still an issue.

Ubuntu 12.04:

$ php -v
PHP 5.3.10-1ubuntu3.5 with Suhosin-Patch (cli) (built: Jan 18 2013 23:40:19)

$ php --re gd | grep "Function"
  - Functions {
    Function [ <internal:gd> function gd_info ] {
    Function [ <internal:gd> function imagearc ] {
    Function [ <internal:gd> function imageellipse ] {
...
Still (or again?) no imagealias(), imagerotate(),...

Ralf

Revision history for this message
Beli (beli) wrote :

I can confirm that this still affects Precise.

Revision history for this message
James Lewis (james-fsck) wrote :

Also appears to affect Trusty.

Revision history for this message
Pierre (pierre-php) wrote :

There is no need anymore to use bundled gd as long as gd 2.1 is used. We
have implemented all missing features in the upstream libgd.
 On Mar 18, 2014 2:21 PM, "James Lewis" <email address hidden> wrote:

> Also appears to affect Trusty.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/74647
>
> Title:
> php5-gd not using bundled GD library
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mantis/+bug/74647/+subscriptions
>

Revision history for this message
James Lewis (james-fsck) wrote :

I've just noticed that comment in the following :-

https://bitbucket.org/libgd/gd-libgd/issue/115/backports-php-internal-functions-to-libgd

Seems like there's a chance of a solution in the medium term, although I guess it's probably a bit late to get this into 14.04...

Revision history for this message
James Lewis (james-fsck) wrote :

I stand corrected on 14.04, it seems that as per the link in my previous post, only imageantialias is still missing, the rest have been backported!

$ php -r "var_dump(function_exists('imagerotate'));"
bool(true)

Revision history for this message
dakisan (petedakin+ubuntu) wrote :

Reading this, should the community hold out any hope that GD will ever be viable on Ubuntu or its derivatives, eg Mint. At least for those wishing to run applications that rely on imageantialias? I've just installed Ubuntu and am hitting this imageantialias blockage - for anyone with the same issue, and just wanting to get on with productive work, it seems to render this distro nigh on useless.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.