Hello,
My problem stems from reading an image from the local disk and displaying it. There's a middle step of storing it in a database, but I simplified the problem into this test script that replicates the error:
The image "http://example.com/test.php" cannot be displayed, because it contains errors.
test.php looks like this:
$location='/location/to/image.gif';
$size = getimagesize($location);
$img_type = $size['mime'];
$data = file_get_contents($location);
$img_data = addslashes($data);
header("Content-type: ".$img_type);
print $img_data;
A print_r of $size gives me valid information (e.g., $size is "images/gif") so this shouldn't be a permissions problem.
I am using examples from online of uploaded images instead of images grabbed locally.
What might be the issue?
Thanks in advance.