Issue with file download from BLOB type data

i have been using this for a while, with no problems, including on hosted machines.
the upload to the database works fine.. not the issue, and the download script also works fine, on the local WAMP machine.
but once moved to the server it fails.. the query does not work.
i have a feeling that it is something to do with the managed hosting i am using, but they say no, i have tried it on 2 seperate hosted machines (different providers), with no joy.
if i run the select query on the hoisting server via phpmyadmin, the query runs ok.
any suggestions as to what may be causing the problem on the server compared to the local WAMP machine?
i really don't know where to start looking, or where to point the hosting company.
This is the php code to download the blob data, works fine on local WAMP setup, browser asks if you want to save the file/open etc. as expected.
<?php require_once('Connections/connTracker.php'); ?>
<?php
// if id is set then get the file with the id from database
if(isset($_GET['docindex']))
           {$id    = $_GET['docindex'];
        $query = "SELECT document_name, document_type, document_size, document_content " .
           "FROM tracker_documents WHERE document_index = ".$id;
*** seems to be failing here when running the query ***
$result = mysql_query($query) or die('Error, query failed');
           list($name, $type, $size, $content) = mysql_fetch_array($result);
     header("Cache-Control: maxage=1"); //In seconds
   header("Pragma: public");
     header("Content-length: $size");
           header("Content-type: $type");
           header("Content-Disposition: attachment; filename=$name");
           echo html_entity_decode ($content);}
exit;
?>

Hi Gun,
You are the only one responded to my issue. I have allocated some points.
Yes. I have checked the assignment in CRM organizational model.
I did download the org. structure from ECC 5.0
All objects including sales offices are activated for determination and I have verified with green light
As per your suggestion if the sales area data is not matched between the two systems, then how come the error will not reappear during the bdoc reprocess?
What is missing during the first time bdoc process? Looks something is missing for validation module?
Any inputs?
Thanks,
Raj

Similar Messages

  • Issue with File Download(messageDownload) on Search Page.

    Hi,
    I created a custom OAF search page which fetches values from one table. The document in getting stored in my custom table in a BLOB colums and NOT in FND_LOBS.
    The table has 3 collumns along with others:
    1st is primary key (Record_Seq) ==> number data type
    2nd to store actual file name (File1Name) ==> varcahar2 data type
    3rd to store the actual uploaded data (File1Data) ==> BLOB data type
    The reason for having the “File1Name” is so that I can display the original file name of the document that was uploaded, instead of just the “view” in the search page results .
    On the File1Data BLOB and created a messageDownload for that under query results table with following details:
    ID : File1Data
    ItemStyle : messageDownload
    FileMIME Type : pdf
    Datatype : BLOB
    View Instance : LacEmpExposureVO1
    view Attribute : File1Name
    File View Attribute : File1Data
    When I click on the "File1Name" data hyperlink, it is opening only the first document corresponding to the first record in the search page results.
    For example, If my search page returns 10 rows then when I click on the file1name on any row, It is open the first row file name only.
    I have a primary key column(RECORD_SEQ) in the Table / EO / VO which is displayed in the search page results.
    Also one weird thing is happening:
    If I try to do this more than 2 times then it is opening the update page with the first record from the search page results…
    I tried to print the context and it is nul the first time, But the second time then context is changing to "update". Dont know how this is happening????
    Any advice is greatly appreciated as it is very crucial for me to get this resolved ASAP. I have looked at several forums and did a lot of things as advised in the forums . But nothing seems to work for me.
    Thanks,
    Mir
    CO code for the search page
    ===========================
    if (pageContext.getParameter("Create")!= null)
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of CREATE");
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureCreatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    else if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of UPDATE");
    System.out.println("LacEmpExposureCO ==> RecordSeq in PROCESS FORM REQUEST is: " + RecordSeq);
    HashMap params = new HashMap(1);
    params.put("RecordSeq", RecordSeq);
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureUpdatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    params,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    else {           
    String strEvent = pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);
    System.out.println(strEvent);
    System.out.println("Into the last ELSE part in LacEmpExposureCO.java");

    Duplicate post -- Issue with File Download(messageDownload) on Search Page.

  • Questions regarding jsp file download from blob

    Hi developers, i'm doing jsp file download from a blob column in DB2 using struts,
    1) How do i design the jsp page such that the page will show perhaps a hyperlink for me to download the file?
    2) What about struts-config.xml? Do i need to modify any mappings there?
    It would be great if some kind developers were to provide some sample codes for me. Thanks alot. Your effort is kindly appreciated.

    http://kr.forums.oracle.com/forums/thread.jspa?threadID=1982213 - looks similar, you may need to change contentType as per use case

  • Issue with customer download from ECC 5.0 to CRM 5.0

    Dear CRM gurus,
    We are facing very strange problem regarding sales area and sales office in CRM 5.0 test system
    During the download of an ECC 5.0 customer into CRM the BDOC is giving the following error - 'Sales office O 50000617 is not available' and 'Sales office O 50000617 sales group not maintained for sales area O 50000608     10 10'and Validation error occurred: Module CRM_BUPA_MAIN_VAL, BDoc type BUPA_MAIN.
    I just select the BDOC and reprocess it immediately. Now the customer is downloaded into CRM and BDOC turns into green. I am also able to see the sales office and sales area in the downloaded CRM BP.
    The sales office 50000617 is very much there in CRM and is properly assigned to sales area 50000608     10 10. That's why, I should be able to reprocess the struct BDOC successfully.
    But for some reason the sales office is not getting determined first time during the download. This issue is driving me crazy. This only happens with the customers with sales office. If there is no sales office in ECC customer (i.e. the field is empty) then there is no issue. This customer will get downloaded without any error.
    Also the downloaded material doesn't have the sales area data. 
    This issue doesn't happen in our development system. The only difference is, sales org structure in development system is manually created and it is downloaded from ECC in test system.
    Can you please advice me on how to solve this issue?. It is a bit urgent.
    All valuable inputs must be rewarded,
    Regards,
    Raj

    Hi Gun,
    You are the only one responded to my issue. I have allocated some points.
    Yes. I have checked the assignment in CRM organizational model.
    I did download the org. structure from ECC 5.0
    All objects including sales offices are activated for determination and I have verified with green light
    As per your suggestion if the sales area data is not matched between the two systems, then how come the error will not reappear during the bdoc reprocess?
    What is missing during the first time bdoc process? Looks something is missing for validation module?
    Any inputs?
    Thanks,
    Raj

  • Issue with Attachment download from Mail?

    I am having an issue with an attachment. I opened the attachment from an email account on my iPad2 and the screen has just gone black. Mail will not let me out of trying to view the attachment. I tap on the screen and nothing happens. It has frozen my mail accounts. Any one have an idea how to cancel the attachment if the mail is not responding?

    Do a hard reset: Press and hold on the Home button and the On/Off button at the same time. Continue to hold even after you see the "Slide to Power off" screen. Hold until the Apple logo comes up.

  • Issue with songs downloaded from iTunes

    Hello, I've downloaded all of my music from iTunes however, it seems that a lot of my songs no longer work. They come up in my playlist when I suffle my songs but they just get skipped over and when I try selecting them individually, nothing happens. Also, when I shuffle my music, the image and song title will come up but it will be an entirely different song playing. Does anyone know why this happens? This has been happening since March.

    Assuming you are in a region where you are allowed to redownload your past music purchases, delete the broken tracks from your iTunes library, close and then reopen iTunes, go to the iTunes Store home page, click the Purchased link from the Quick Links section in the right-hand column, then select Music and Not on this computer. You should find download links for your tracks there.
    While downloading select Downloads in the left-hand column and make sure Allow Simultaneous Downloads is unticked.
    If the problem persists, or that facility is not yet available in your region, contact the iTunes Store support staff through the report a problem links in your account history, or via Contact Support.
    See also: HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store
    tt2

  • Problem with LR5 Import on MAC, it always shows "file cannot be imported because it could not be read" This happens with file downloads from the memory card as well as with files from the hard drive. Happened out of the blue and I cannot figure out why. P

    I need some instructions to solve this problem, has anyone had the same problems? We just got an imac and changed from windows to mac. At first LR worked perfectly, all of a sudden I cannot import pictures anymore. Please help!!

    The destination directory, where Lightroom is trying to copy photos to, does not have WRITE permission. Change your permissions.

  • Failed to import publish settings file in Azure Toolkit for Eclipse with Java downloaded from Azure Management Portal

    I tried to deploy the Hello World JSP application to Azure from Eclipse following the instructions at http://msdn.microsoft.com/library/azure/hh690944%28VS.103%29.aspx. Got the following error when trying to import Publish Settings file downloaded from Azure
    Management portal:
    Importing MyMSDN.publishsettings file failed. Reason: failed to parse file. Ensure publish settings version is 1.0.
    Could someone help me solve this problem? Thanks.

    Hi huihuang,
    It seems there is some issue with your publishsettings file, could you open this file and copy the content here? Or please have a look at this article:
    http://gauravmantri.com/2012/09/14/about-windows-azure-publish-settings-file-and-how-to-create-your-own-publish-settings-file/ for more information about it.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have a seagate external hard drive with files copied from windows pc. If I will download NTFS driver from seagate to my mac, could I install it safely without harming my files in the external hard drive? I am afraid I may erase all files in there.

    I have a seagate external hard drive with files transferred from my windows pc. If I will download NTFS Driver from seagate to my mac, could I install it safely without harming my files? I am afraid.. I might erase all my important files during the installation..

    Thanks a lot! I have already downloaded Paragon Driver and it works well with seagate external hard drive. I am copying as of now my important files from my mac to it. However, I have only the trial version which will expire in 10 days. I don't have credit card to buy for it.

  • Just upgraded to Lion, can't open any pdf file downloaded from internet that was fine with Leopard. How can I overcome this obstacle ?

    Just upgraded to Lion, can't open any pdf file downloaded from the internet that was fine with Leopard before. I just got a black screen when I clicked on a pdf icon on a given internet site, and same happened with several sites that I visited. How can I overcome this obstacle ?

    Try two things with Safari not running:
    1) Launch Adobe Reader, open its preferences, select the Internet category, and check the values under "Display PDF in browser using".  If it's checked, try unchecking it.
    2) Look in /Library/Internet Plug-Ins (at the top-level of your boot volume) for something names AdobePDFViewer.plugin.  If you see such a file, try moving it to a folder named "Disabled Plug-Ins" (if such a folder exists) or onto the Desktop.
    Then see how things work.

  • Jar files downloaded from SkyDrive are being renamed to jar.zip files

    I have cut and pasted the following series of exchanges from when I posted the problem onto SkyDrive's support forum. I hope that someone might be able to propose a better solution to the problem that I have. Thanks for your help.
    MDSms asked on
    Uploaded jar files convert to jar.zip files when downloaded from SkyDrive
    I have uploaded an executable jar file to SkyDrive. (I will call this FILE.jar). The file is intact and indicates that it is a jar file type when the file is viewed by Properties within Skydrive. However, when I download (or others download through a share link) the file, it is being saved onto the local computer's download file with .zip appended to the file name (FILE.jar.zip). The downloaded file can be renamed to remove the .zip appendage and subsequently run successfully. However the folder options for the folder where the downloaded file resides must be changed for disable "Hide known file extensions" prior to being able to remove the .zip appendage. While I have figured out the workaround for this problem, this manual renaming procedure is entirely too cumbersome as a solution for sharing this file with others. How can I prevent or disable the FILE.jar file from being renamed to FILE.jar.zip when it is downloaded from SkyDrive?
    All Replies (5)
    Audrey_P. replied on
    Forum Moderator
    Hi,
    Thank you for posting. Let me try to assist you with your issue with your files.
    In order for us to reproduce the issue on our end. Please provide us with the exact steps that you did when you uploaded the files as well as the steps when you are downloading it.
    We will be needing the steps to help us figure put what is causing you this issue.
    We look forward to your response.
    Thank you.
    Audrey P.
    MDSms replied on
    Reply
    The file was uploaded by first logging onto my SkyDrive account using Windows 7 Pro and Firefox browser, then a new folder in my account was created without sharing privileges, then the folder was opened and the FILE.jar was uploaded into the folder using the "Upload" option on skydrive account menu. Sharing privileges for FILE.jar were then created (view only), and the shortened url link was sent to the individuals that I was trying to share the file with. was then turned on. When these people use the link to download the file, it is being saved as FILE.jar.zip.
    When I try to download the file through the skydrive account download option, it is being saved onto my computer as FILE.jar.zip and this occurs when I try to download the file while signed into my skydrive account as well as when I am not signed into my skydrive account (using the shared file link).
    This PNG shows the information provided by clicking on the download icon (down arrow) within the Firefox browser; note that the file was downloaded as FILE.jar.zip and that the source was live.com. When I use Windows Explorer to look at the same file within the Download folder itself, examining the file's properties details also shows that it is being saved as FILE.jar.zip and is of the file type compressed zip folder.
    This PNG shows the information displayed to me from my skydrive account when I view the originally uploaded file's properties; note that the information shows that the file is a jar file type.
    When I utilize Internet Explorer 9 to access the file, FILE.jar is being downloaded onto my computer as a jar file type. This PNG shows the information provided by Tools/View Downloads within the IE9 browser. Note that in this instance, the information indicates that the file is being downloaded from yzudea.blu.livefilestore.com.
    It appears to me that the problem (the FILE.jar file being renamed to FILE.jar.zip) arises from the fact that a jar file downloaded from skydrive using firefox, is being sent from live.com whereas a jar file downloaded from skydrive using IE9 is being sent from yzudea.blu.livefilestore.com.
    I want to make sure that a person receiving a share link from me for FILE.jar is able to download it without modification to the file name regardless of which browser is being using to access the link. How can I make sure that this occurs?
    Any help is appreciated. Thanks.
    Michelle Anne D. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    I appreciate you for providing as much information as you can about the issue, as well as for uploading screenshots on what you see from the downloaded file. About your initial concern wherein the file gets renamed with .zip after the original file extension, this is solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented.
    Moreover, you may see the file servers live.com and yzudea.blu.livefilestore.com to be different with one another, but they actually are sent from the same SkyDrive server. This in turn, depends on the web browser where the file is being downloaded as well. The live.com file where it was downloaded from Firefox simply masks its original server yzudea.blu.livefilestore.com.
    As for your last query about your recipients downloading the file without the hassle of renaming it from a .zip file, you can simply tell them to download it through Internet Explorer.
    Should you have other queries or additional information that might help in our investigation, I highly encourage you to post them here.
    Regards,
    Michelle
    MDSms replied on
    Michelle,
    Thanks for your reply. Yes, I could simply tell them to download the file through Internet Explorer, but is there another solution or workaround to the problem I have described here? Am I being punished with the curse of this problem simply because I (or the individuals with which I wish to share FILE.jar with) choose to use Firefox instead of IE? Will the use of any other browser instead of IE (Chrome, Safari, etc., etc.) still result in the same problem?
    You stated that it is "solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented"........could the problem be overcome by designating one or both of the file server addresses as Trusted Sites within the browser options setting?
    I look forward to your response. Thanks in advance.
    Joy V. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    We understand your concern. Since the issue does not occur in Internet Explorer, it has something to do with Firefox's security feature. You might want to verify this concern by contacting Firefox support.
    Hope this helps. Let us know if we can further assist you with SkyDrive.
    Thanks,
    Melanie Joy

    Try to delete the mimeTypes.rdf file in the Firefox profile folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions

  • Excel 2013 doesn't display .xls file downloaded from Wells Fargo (Inconsistent)

    I have two computers exhibiting the same problem but not every time.
    Windows 7 Pro 64-bit
    Office 2013 64-bit
    Download an .xls file through Chrome or IE.
    Download is fine
    Attempt to click to open.
    Excel Launches, appears in the taskbar, file never opens... Excel is unresponsive.
    Right Click Task Bar icon, program will close.  You can open other files just fine.
    I noticed when you double click the file to open, two excel.exe processes open in Task Manager... not sure if that is normal.  When you close excel, they both disappear.
    Thoughts?

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Did this issue only occur with the .xls files downloaded from Wells Fargo website? Have you tried from other website, such as OneDrive?
    Have you tried to download some .xlsx files to test from Wells Fargo website?
    Please do some tests to narrow down the issue.
    1) Try to convert the .xls files to .xlsx files, if we can open the .xlsx correctly, this issue may be caused by the compatibility issue between Office 2013 and Office 97-2003 format. Thus, I recommend you convert the file to Excel 2013
    format.
    2) Open the Excel program first=>Click Open=>Navigate to the file=>Then open it. If it also can be opened correctly, this issue may be caused by the Dynamic Data Exchange. Please try to turn off the "Ignore other applications that use
    Dynamic Data Exchange (DDE)“ setting.
    Steps:
    1.Click the File tab, and then click Options.
    2.Click Advanced, scroll down to the General section, and then clear the Ignore other applications that use Dynamic Data Exchange (DDE) check box in the General area.
    3.Click OK.
    If you have any update, please feel free let me know.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • APEX 4.0: error while opening a XLS file downloaded from interactive report

    Hi,
    I'm getting below error while opening a XLS file downloaded from an interactive report (APEX 4.0).
    "The file you trying to open, 'customer_2.xls', is in a different format than specified by the file extension.
    Verify that the is not corrupted and is from a trusted source before opening file. Do you want to open file."
    Yes No Help
    May be this one Apex 4.0 issue.
    please help me.
    Thanks
    Mukesh

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • File download from server

    Hi All,
    I have written a code that downloads a file from server using the following link given by Frank,
    File download from server
    I am able to get a open/save/cancel dialog with help of this. But issue is that applications of kind .doc/.xls/.ppt gets opened (If user clicks open) right in the internet explorer window instead of getting opened in a new office application....
    However .pdf runs fine.
    Can any thing be done for this???
    Any help....
    Regards,
    Amitt

    Hi,
    what do you have for the content disposition header?
    Try this:
             response.setHeader("Cache-Control", "max-age=0");
             response.setHeader("Content-Disposition", "attachment; filename=\"" + fname + "\"");
             response.setContentType("application/x-download");Brenden

  • Issue with file to file in PI 7.3 (Splitting huge files)

    Hi All,
    Need your help in fixing the issue with file splitting
    We are doing some sample scenarios(file to file) on PI 7.3 server.
    We are trying to split a 10MB file by using the 'Advanced Mode' option in the sender file adapter. We gave max split file size as 2MB. The file got split into 5 chunks and was successfully sent to receiver file adapter. In receiver adapter we are able to see that. But in the target folder only 1 file was seen with size 2MB. All other chunks were missing. We need to have the whole data sent from source to target.
    How to fix this issue? please provide your inputs.
    Thanks and Regards,
    Lakshmi Narayana

    PI 7.3 has capable of processing larger size files.
    Questions:
    Have you picked EOIO quality of service? Hope you dont do mapping or content conversion for this file?
    have you seen this link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a06d79f3-d094-2e10-1a81-f4d802d0bcf1?QuickLink=index&overridelayout=true
    http://help.sap.com/saphelp_nw73/helpdata/en/44/682BCD7F2A6D12E10000000A1553F6/frameset.htm

Maybe you are looking for

  • After changing my 1st cartridge Envy 5530 printer wants to realign and scan each time it's turned on

    After changing my 1st cartridge Envy 5530 printer wants to realign and scan each time it's turned on.  When I do this, it says "Scan not detcted."  After a 2nd scan, it sets itself to default settings.  Then I can use the printer.  Is there a way to

  • How to save XML timeformat to oracle without loosing "timezone-compensati"

    I hope i post this in the correct forum and I provide enough info for you to understand what I'm looking for... Some time ago I got some help here about how to read a incoming XML-file and insert data into a table, where the Element-tag describes the

  • Invoice output as PDF attachment via email.

    Hi All, I have a requirement wherein an invoice when saved should generate a mail output (external send) with the invoice as a PDF attachment. I have the system set up for external send & scot settings but am stuck up with the PDF attachment. I also

  • Replication agent has not logged a progress

    Hi expert, I have problem with my transactional replication. Below details info of my SQL Server. OS = Windows Server 2008 R2 Enterprise SQL Server = MS SQL Server 2008 R2 Two Servers (by the way I'm using Hyper-V VM) 1. SQL-1 is the publisher 2. SQL

  • Desktop manager for mac will not read the memory card

    I have a Storm and the desktop manager does everything correctly except it will not recognize the media card for music.  It says "please insert a media card in your device."  Ive got the 8GB microSD card and it shows up in the phone memory but i cant