Plex 2E

  • 1.  Blob files and inaccessible temp folder location

    Posted Nov 24, 2017 10:51 AM

    We have a program that takes a local file and writes it as a BLOB to the database using WINAPI/SetBlobFile. No problem on my local PC but when running at a customer (OS: Windows Server 2008 R2) it fails to write the BLOB.

     

    We have discovered that this is because Plex tries to write an intermediate file of the form "obxx" to  C:\Windows\Temp, but it does not have access to this folder.

     

    On my local (Win 8) PC it writes it to the user %temp% folder, so it is fine there.

     

    Is there a way around this? Is there a way to force it to write its intermediate file somewhere else? Where is it getting C:\Windows\Temp from?

     

    Thanks

    Phil Hodge



  • 2.  Re: Blob files and inaccessible temp folder location

    Broadcom Employee
    Posted Nov 27, 2017 11:28 AM

    Hi Phillip, 

     

    You noted on your Windows 8 PC/machine, it writes the intermediate files to your %temp% location, which I believe defaults to "%userprofile%\appdata\local\temp" per the environment settings.  On a Windows 2008 r2 server, the %temp% location by default is set to "C:\Windows\temp" in the system environment settings.   Could you change the %temp% environment setting on the Windows 2008 r2...as Plex is referencing the %temp% location when it writes these obxx files.  

     

    Note:   I will move this Plex "question", to the Plex "discussion" area for further review by the user community.

     

    Thanks,

    Steve   



  • 3.  Re: Blob files and inaccessible temp folder location

    Posted Nov 27, 2017 11:44 AM

    Hi Steve

     

    When I am on the 2008 server machine and type SET at the command prompt I get this (edited to show only relevant variables) - the temp variable is not C:\Windows\Temp here, in fact I cannot see that path in any of the environment variables. So I am not sure which variable it is picking this up from?

     

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

     

    C:\Users\phho>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\phho\AppData\Roaming
    HOMEPATH=\Users\phho
    LOCALAPPDATA=C:\Users\phho\AppData\Local
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\phho\AppData\Local\Temp\2
    TMP=C:\Users\phho\AppData\Local\Temp\2
    windir=C:\Windows

     

    C:\Users\phho>

     

    Thanks

    Phil



  • 4.  Re: Blob files and inaccessible temp folder location

    Broadcom Employee
    Posted Nov 27, 2017 12:03 PM

    Phillip, 

     

    Ok, can you check your User and System environment settings to see if a difference exists for the TMP and TEMP variables.  Also, I see the '....\temp\2' (the added 2 digit) to your enviornment settings.   Running a google search I found the following... 'Temporary directory environment variable in Windows Server 2008 ', this explains the added 'digit' to the TEMP and TMP locations and the recommendation on this link may resolve your problem.   Again, Plex will simply reference the %TEMP% location when writing/reading intermediate type files. 



  • 5.  Re: Blob files and inaccessible temp folder location

    Posted Nov 27, 2017 12:30 PM

    Thanks Steve, I found out that the System Variable for TEMP is C:\Windows\TEMP. I didn't know there was a difference between system and user. It seems odd that the system temp location is in a place within the Windows directory that is not accessible to our applications.

     

    I am fairly sure our customer won't like us touching these variables, so I think I we will have to back out of using BLOBs and try doing it a different way.

     

    Thanks again

    Phil