connectionscentres
Programmer
Hi,
I am running php version 5.0.3 and I think I have GD enabled. On the php info page for my server it says:
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.7
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
However, when I try and run any GD-related functions e.g. imagecreatefromjpeg($myimage); it fails and the browser shows.
The image “ cannot be displayed, because it contains errors.
I have made sure there are no unnecessary blank spaces and there are no syntax errors.
I have checked my apache log files and it complains that the supplied argument is not a valid Image resource.
I have therefore cut the code down to the bare minimum to just display a simple image
<?php
header ("Content-type: image/png");
$im = imagecreate (300, 300);
$white = imagecolorallocate ($im,255,255,255);
?>
Now I get no error codes in the apache log but it still doesnt display and says the same as before.
Any suggestions?
Cheers.
I am running php version 5.0.3 and I think I have GD enabled. On the php info page for my server it says:
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.7
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
However, when I try and run any GD-related functions e.g. imagecreatefromjpeg($myimage); it fails and the browser shows.
The image “ cannot be displayed, because it contains errors.
I have made sure there are no unnecessary blank spaces and there are no syntax errors.
I have checked my apache log files and it complains that the supplied argument is not a valid Image resource.
I have therefore cut the code down to the bare minimum to just display a simple image
<?php
header ("Content-type: image/png");
$im = imagecreate (300, 300);
$white = imagecolorallocate ($im,255,255,255);
?>
Now I get no error codes in the apache log but it still doesnt display and says the same as before.
Any suggestions?
Cheers.