I have on my PC Ubuntu 14.04, Apache2 as webserver and PHP 5.5.9 as intepreter. I installed with APT the package php5-gd, restarted the server and checked if GD is active with:
php -i | grep -i --color gd
The output was:
/etc/php5/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD Version => 2.1.1-dev
gd.jpeg_ignore_warning => 0 => 0
GDM_LANG => de_DE
GDMSESSION => ubuntu
_SERVER["GDM_LANG"] => de_DE
_SERVER["GDMSESSION"] => ubuntu
I wanted to test the libary with this code snippet:
<?php
$bild = imagecreatetruecolor(200,250);
$weiss = imagecolorallocate($bild, 255, 255, 255);
$mittelblau = imagecolorallocate($bild, 203, 215, 230);
imagefill($bild, 0, 0, $mittelblau);
imagejpeg($bild, "test.jpg");
?>
PHP didn't created a picture. I tried to output the image directly (Yes, I used a header), but Firefox said, that the image is broken.
I hope smb. can help me
Best regards
Noel
EDIT: phpinfo() says, that everything is activated that's related to GD.