From: bram at x-plose dot be
Operating system: debian
PHP version: 4.3.8
PHP Bug Type: GD related
Bug description: GD causes an segmentation fault
Description:
------------
When i open an php script that uses GD it shows an segmentation fault in
error.log
Server software: Apache/1.3.26 (deb package) (Unix) Debian GNU/Linux
PHP/4.3.8
The script is comming from php.net so i dont supose there's an error in
it.
I included /usr/local/lib/php in php.ini and i added extension = gd.so
'./configure' '--with-jpeg-dir=../jpeg-6b/' '--with-pdflib'
'--with-tiff-dir=../tiff-v3.6.1/' '--with-png-dir=../libpng-1.2.5/'
'--with-zlib-dir=../zlib-1.1.4/' '--enable-static-pdflib'
'--enable-gd-imgstrttf' '--with-gd' '--with-mysql' '--with-apxs'
'--enable-fast-cgi-redirect' '--with-freetype-dir=/usr/local/freetype2/'
'--with-iconv' '--with-gettext'
Reproduce code:
---------------
<?php
header("Content-type: image/png");
$string = $_GET['text'];
$im = imagecreatefrompng("banners/bannerxplose.test.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
?>
Actual result:
--------------
I only get, Cant find server and in error.log i find
[Sun Aug 8 04:12:51 2004] [notice] child pid 24310 exit signal
Segmentation fault (11)
[Sun Aug 8 04:12:51 2004] [notice] child pid 2085 exit signal
Segmentation fault (11)
--
Edit bug report at http://bugs.php.net/?id=29568&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29568&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29568&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29568&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29568&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29568&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29568&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29568&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29568&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29568&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29568&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29568&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29568&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29568&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29568&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29568&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29568&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29568&r=float