SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    istanbul
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem on getting image from database.

    Hi,

    I've problem about reading the image binary from database. There is and sql database created by a financial program. I want to get images from its database where it keeps in an image field. I can put images by using that program.

    When i get the result by "SELECT Data FROM sql9000ImageData" query and write it to a .jpg file.

    1) Created file size be 4096 bytes not depending whatever the image size, i put the database.

    2) The image is fully black except a few pixels of its bottom.

    I don't know what am i going to do?

  2. #2
    SitePoint Member
    Join Date
    Dec 2004
    Location
    istanbul
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeap. I dudit!

    Both of the problem and the solve was in php.ini.

    mssql.textlimit and mssql.textsize limits were default 4096 bayt. I've made the changes below.

    mssql.textlimit = 2147483647
    mssql.textsize = 2147483647

    I hope it helps for other people who has/will have same problem.

  3. #3
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    Location
    Quincy
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Storing images in a database is not the greatest solution, especially if they are quite large.

    It is best to instead store them on the filesystem, and use the database to store the paths to the image files.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •