I have an apache2 server with 2 virtual hosts defined (with same options): - first is the production one, on www.domain.com, which works fine - second is the development one, on dev.domain.com, which works almost fine, except that images returned by php doesn't show. Images directly linked to files (img src or css) work fine.
The function to show images is quite simple :
$data = $this->image_model->get_image_blob($id);
header('Content-Type: image/jpeg');
echo $data;
At first, I thought there was a problem with data, but no, if I read data from an actual jpeg file, it doesn't show either.
An interesting thing is that if I create an image from data with :
$im = imagecreatefromstring($data);
imagesx and imagesy return correct image size. But I still can't display the image. And there is no error.
Any idea about what happens?