php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36301 No results with saving and retrieving images to and from database
Submitted: 2006-02-06 10:41 UTC Modified: 2006-02-06 10:46 UTC
From: sea dot iz at tiscali dot cz Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 5.1.2 OS: Win2000, Win2003
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sea dot iz at tiscali dot cz
New email:
PHP Version: OS:

 

 [2006-02-06 10:41 UTC] sea dot iz at tiscali dot cz
Description:
------------
I'm using following code for saving and retrieving images to and from database (MS SQL 8.0). This works under PHP 5.0.2, but it stops to work after upgrading to 5.1.2 and I must return to old version. Tested on Win2000, WinXP and Win 2003 server.


Thanks for some help.

Reproduce code:
---------------
//my code:
//Saving images:

        $datastring = file_get_contents($filenam);
        $data = unpack("H*hex", $datastring);

        $qry = "update TABLENAME set IMAGECOLUMN."=0x".$data['hex']." where KEYCOLUMN=$id";         $ret = mssql_query($qry, $Link);

//Retrieving images:
    $qry = "select IMAGECOLUMN from TABLENAME where KEYCOLUMN = $id";

    $result = mssql_query($qry, $Link);
    $row = mydb_fetch_array($result);
    header("content-type: image/jpeg");
    $nm = strtoupper($_REQUEST['IMAGECOLNAME']);
    echo $row["$nm"];


Expected result:
----------------
With 5.0.2 everything works correctly, but with PHP 5.1.2 there is no error report while saving and no image result while retrieving.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-06 10:46 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 22:01:33 2024 UTC