| Author |  | 
      
        | gg102 Senior Member
 
  
 
 Joined: January 29 2013
 Location: United States
 Online Status: Offline
 Posts: 246
 | 
          I seem to have found a possible bug.
           | Posted: September 30 2017 at 18:11 | IP Logged |   |  
           | 
 |  
 The function ph_fileexists() functions seems to work nicely on a "local" drive, but doesn't seem to work on a mapped drive.
 
 ph_fileexists( "r:\home\pi\www\file.log" )
 Where r: is a mapped drive
 
 I'm (unfortunately) using windows 10, and yes, I can fully access the drive in other apps, and programs and standard windows UI.
 
 Does anyone use this function on a mapped drive?
 
 
 
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          did you try using FQDN  (fully qualified domain name)
           | Posted: October 01 2017 at 10:01 | IP Logged |   |  
           | 
 |  
 I had problem with Mapping with windows itself that
 sometime on reboot wont be available . (that was in
 win7)
 
 been using win 10 for while now and I use FQDN to
 reference the mapped drive.
 
 I am using to do backups for example
 
 ph_backupdb("\\WDMYCLOUD\Public\Util\POWERHOME\database\
 "+string(today(),"yyyymmddmmss")+".db",0)
 
 Nick
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | gg102 Senior Member
 
  
 
 Joined: January 29 2013
 Location: United States
 Online Status: Offline
 Posts: 246
 | 
          Nick,
           | Posted: October 02 2017 at 13:10 | IP Logged |   |  
           | 
 |  
 Thank you for your suggestion.  In this case, I'm on a local net, trying to check the status of a file on a Raspberry Pi.
 There isn't a domain, but I did try using the full server name.
 
 I did try:
 ph_fileexists( "//192.168.x.xxx/home/pi/file.ext")
 and
 ph_fileexists( "\\192.168.x.xxx\home\pi\file.ext")
 and all the variants.
 
 I also tried using the Raspberry Pi WINS/DNS name, "raspberrypi" with no joy.
 
 I am currently working to map a windows drive onto the Raspberry pi so it can be "local" to PH.  That will work, but I
 would prefer to NOT to map the Windows drive to the Raspberry Pi as that opens a security risk on the PH machine that I'd
 prefer to not have. I'd prefer that the Pi be vulnerable to hacks than the PH machine.  Oh well......
 
 Thanks for your suggestion, it was a good one!
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          I have couple of Linux box but  none shared.
           | Posted: October 05 2017 at 20:46 | IP Logged |   |  
           | 
 |  
 also look into and search for windows when User Account
 Control (UAC) is enabled map drive not available in some
 application.
 "UAC treats members of the Administrators group as
 standard users"
 
 other idea is to run batch file and if file found copy
 to local and so on . run  batch file from PH before you
 check for file from local now.
 
 Just another idea.
 good luck
 
 Nick
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          I tried on one of my linux based router and it worked
           | Posted: October 08 2017 at 14:00 | IP Logged |   |  
           | 
 |  correctly directly without mapping command on win 10.
 
 also worked with or without hostname
 
 ph_fileexists("\\GL-AR300M\sda1\test.txt")
 ph_fileexists("\\10.0.xxx.xxx\sda1\test.txt")
 
 files are is shared by samba install on the router.
 
 I hope this helps
 
 Nick
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | gg102 Senior Member
 
  
 
 Joined: January 29 2013
 Location: United States
 Online Status: Offline
 Posts: 246
 | 
          Nick,
           | Posted: October 08 2017 at 14:44 | IP Logged |   |  
           | 
 |  
 That's very interesting.  I'll need to seriously
 investigate the Samba congif.  I'm not a Unix/Linux
 guy so I could easily have something wrong there.  I
 can read and write to the drive/file, but for some
 reason PH couldn't sense ph_fileexists().  This one
 might take a while to find now. Your findings are
 important. I'll also have to re-investigate if there's
 something special about the Raspberry Pi version of
 Samba.
 
 Thanks for the update. This one's going to take a
 while..
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          gg,
           | Posted: November 09 2017 at 13:47 | IP Logged |   |  
           | 
 |  
 I can confirm it works for me on my mapped QNAP NAS drive. However, I'll try to do some testing on my Raspberry Pi and see what I can do to get it working.
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | gg102 Senior Member
 
  
 
 Joined: January 29 2013
 Location: United States
 Online Status: Offline
 Posts: 246
 | 
          Dave,
           | Posted: November 09 2017 at 14:10 | IP Logged |   |  
           | 
 |  Thank you, and again, thank you for all your efforts.
 
 You've been busy today!
   
 I have built a work around for this, I write the file from the RPi directly to the PH machine,
 and that works nicely.
 
 Since this is a stable work around, I'd say, to move this DOWN on the list.  For me, it's
 still not working, but it's NOT important now; besides, it might very well be a configuration
 with my implementation of Samba.
 
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  |