Welcome to WebmasterWorld Guest from 220.127.116.11
The problem i face is that these shares are restricted to users and therefore need to know how the PHP can parse user information to the server to access these files?
any help would be great.
But, a general solution... Mount the file server location you want to use (say /root/myfiles/ on the file server), to place on the web server (say /root/htdocs/myfiles/ on the web server). Doing this, any "regular" access to that spot on the web server will automatically retrieve the files off the file server.
I know this approach is possible because system administrators at my work often employ this strategy. Our satellite beams gigabytes of data to our center every day and is stored on a series of remotely connected file servers. For some web tools we use that I have developed (that require those files), our system admins simply mounted the location of the files (from the file server) to a spot on the internal web server, thus giving it access. Then, any link/PHP action/etc to this web server location will yield the file server contents.
If this was a location on the same server (outside the web root), I believe you could use Apache to "map" the location. However, given the stuff you want is on another server, I believe this goes beyond just Apache/PHP and would require the mounting via the OS. Hopefully this guides you in the right direction.
EDIT: Re-reading your question, it seems like your "user" criteria complicates the matter considerably. I am guessing depending on the user working, the mounted file location points to a different spot on the file server; but the user working always accesses the mounted file share? Kind of like the user accessing '/myfiles/' (on user computer) is routed to '/root/userABC/files/' (on file server) [for example]? If this is about the case... you would still need to follow my mounting advice to make the files available to Apache/PHP [mount location on file server, to a location on the web server so PHP/etc has access to it]. The problem is, if the file location is dependent on the user, this complicates the matter, because you can't just mount the file location without knowing the user. Am I ~about understanding your situation correctly?