Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8883 - mod_php4 with pdflib and libgd seg faults
Summary: mod_php4 with pdflib and libgd seg faults
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-08 02:21 UTC by Andreas Westin
Modified: 2003-02-04 19:42 UTC (History)
2 users (show)

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 Andreas Westin 2002-10-08 02:21:18 UTC
If i emerge mod_php-4.2.2-r1 with pdflib and libgd and try to use the functions
in libgd apache seg faults. Emerging without pdflib support libgd works fine.
Perhaps some condition in the ebuild not allowing pdflib with libgd would be a
solution until this problem is fixed.
Comment 1 Ryan Phillips (RETIRED) gentoo-dev 2002-10-18 01:26:38 UTC
should be fixed now...
Comment 2 delta407 2002-10-27 18:53:47 UTC
I was using mod_php-4.2.2-r1 with PDFlib and GD with no issues whatsoever, 
until this change was made that broke my GD support without warning on a 
production system. (mod_php was being rebuilt to get PostgreSQL support, and in 
doing so, completely destroyed the application that used GD.) It took me two 
hours to track down the problem. Please revert this change.

I'm willing to bet your segfaults are due to your specific configuration.
Comment 3 Andreas Westin 2002-10-28 02:36:36 UTC
Well it might be because of my configuration, but im using php with postgresql
support aswell. It does not work if libpdf is compiled in, this problem has been
reported elsewhere by other people. They weren't able to find the specific cause
other than libpdf and libgd.

Next time test things on a dev box before emerging on a production box.
Comment 4 delta407 2002-10-28 09:50:05 UTC
> Well it might be because of my configuration, but im using php with postgresql
> support 
aswell. It does not work if libpdf is compiled in ...

If libpdf is the issue, why does the ebuild 
include it rather than libgd?

> Next time test things on a dev box before emerging on a 
production box.

I did, but I expected mod_php-4.2.2-r1 to be the same between the test 
deployment and the production deployment.
Comment 5 Andreas Westin 2002-10-28 10:05:19 UTC
I dont know, i didnt make the ebuild, I just noticed that my friends app which uses libgd 
functions made apache seg fault. He found on some forum/maillist that this could be caused by 
compiling in support for both libgd and libpdf. So i tested without libpdf and it worked fine. 
Comment 6 delta407 2002-10-28 14:17:12 UTC
Dug this up from http://bugs.php.net/bug.php?id=16841 -- I think the following might be 
relevant:

[13 May 6:35am] k.allan-php@au.darkbluesea.com

I am having a similar 
problem, if you notice in the backtrace, it
references /usr/lib/libpng.so.3 on my system this 
is soft-linked to
libpng.so.5, and if I remove --with-pdflib from my configure line, it
seems to 
link against the correct library and not segfault, but
--with-pdflib it reverts to the version 3 
library and segfaults when I
try to create from PNG in the GD routines

[2 Jun 1:29pm] 
johan@ekenberg.se

I experienced a similar thing with PHP-4.2.1 + pdflib-4.0.2 on 
Linux
(glibc-2.2.3). However, recompiling pdflib with: "--with-pnglib
--with-zlib" (and then 
rebuilding PHP) solved the problem.

[2 Jun 7:05pm] sniper@php.net

So this clearly 
isn't any bug in PHP. Users should always
make sure they're linking with same libraries in this 
kind
of cases.
Comment 7 Ryan Phillips (RETIRED) gentoo-dev 2002-10-28 16:02:07 UTC
libpdf and libgd both include image libraries that conflict with eachother....
AFAIK this hasn't been resolved upstream and is the reason why there are
crashes.  For now, one cannot have both.