I’m trying to show image from DB saved in Image field. But I can see only 63KB of image.
This is my code:
$sql='SELECT Photo FROM Personel WHERE ID_USER = '.$id;
$result=mssql_query($sql);
$res=mssql_fetch_assoc($result);
header('Content-type:image/jpeg');
echo$res['Photo'];
As you can see nothing special, so I think problem in DB or server configuration.
DB installed on Windows XP server.
Actually it’s Access control systems DB, and SQL files installed in that program’s folder, but don’t know this information useful or not.
Any idea?
UPDATE
Screenshot for Photo field type:

Given that your comments say that the entire image is being stored in the DB, it’s possible that the issue is related to a data limit / timeout within PHP and / or the webserver.
EDIT: I’ve left the following part of the answer here for historic info (to show what else we tried) but please see the comments below, as it’s more likely that the issue is related to a PHP or webserver config setting, limiting the size of the response data. Still not fully resolved yet.
I notice you have a
Content-typeheader, but not aContent-lengthheader.You could try adding a
Content-lengthheader with some arbitrary, known value (e.g. 12288) and see if this affects the size of the file returned (since you know that it’s currently 63K – does it change to 12K?)If it does, then you’ll need to get PHP to calculate / find out the actual size of your image and add a Content-length header of that length.