PhP Image help

Thread Solved

Join Date: May 2008
Posts: 3
Reputation: WCSO-IT is an unknown quantity at this point 
Solved Threads: 1
WCSO-IT WCSO-IT is offline Offline
Newbie Poster

PhP Image help

 
0
  #1
May 7th, 2008
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:

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

I'm hoping that it is a simple noobie mistake. Any help is greatly appreciated and thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 3
Reputation: WCSO-IT is an unknown quantity at this point 
Solved Threads: 1
WCSO-IT WCSO-IT is offline Offline
Newbie Poster

Re: PhP Image help

 
0
  #2
May 7th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC