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.
should be fixed now...
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.
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.
> 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.
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.
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.
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.