This is only happening on the live server. On multiply development servers the image is being created as expected.
LIVE: Red Hat
$ php --version
PHP 5.2.6 (cli) (built: May 16 2008 21:56:34)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
GD Support => enabled GD Version => bundled (2.0.34 compatible)
DEV: Ubuntu 8
$ php --version
PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:44:49)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
GD Support => enabled GD Version => 2.0 or higher
<?php
$image = imagecreatetruecolor($width, $height);
// Colors in RGB
$white = imagecolorallocate($image, 255, 255, 255);
$black = imagecolorallocate($image, 0, 0, 0);
imagefilledrectangle($image, 0, 0, $width, $height, $white);
imagettftext($image, $fontSize, 0, 0, 50, $black, $font, $text);
imagegif($image, $file_path);
?>
In a perfect world I would like the live server and the dev server to be running the same distro, but the live server must be Red Hat.
My question is does anyone know the specific differences that would cause the right most part of an image to be cut off using the bundled version of GD?
EDIT: I am not running out of memory. There are no errors being generated in the logs files. As far as php is concerned the image is being generated correctly. That is why I believe it to be a GD specific problem with the bundled version.