Hello all,

I have been working on a simple web app but have run into a small problem. I am still fairly new to php and have found nothing on this topic searching google. I have a getimage.php page that fetches an image from a SQL Server Express 2005 database. It seems to run fine, but when it pulls a picture, only about 1/3rd of the top is displayed. My for the getimage.php is below:

$query = "SELECT INMPICTURE FROM inmates WHERE BOOKNO = '$id'";
	$result = mssql_query($query);
	$data = mssql_result($result,0,"INMPICTURE");
	header("Content-type: image/jpeg");
	echo $data;

I'm hoping that it is a simple noobie mistake. Any help is greatly appreciated and thanks in advance.

10 Years
Discussion Span
Last Post by WCSO-IT

After much frustration I finally figured out what I had overlooked. In order to see the entire image I just had to go into the php.ini and increase the value for the mssql.textlimit and mssql.textsize. I'm not sure if I had to do both or not, but it is working perfectly now.

Hopefully someone else can bypass my mistake through this post :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.