ajlisowski Posted March 25, 2010 Share Posted March 25, 2010 So I am working on an intranet application for a company and right now one can upload files to share with other users. The following request was just submitted by my boss... "Marketing would like to use the project system to attach media files for unified storage. The linux box is not a good place for holding that amount of data. Need to add an option to document function to choose a storage folder. The folder could be a physical drive on the machine running the browser or a network share the user has access to. If this option is chosen, then instead of uploading the files, it would display the contents of the selected folder." So basically, he wants instead of uploading, to allow users to select a folder locally and have the intranet system somehow display this to other members. I am 90 percent sure this is not possible with PHP. I dont see how it would be. Unless I could grab the users IP and then connect to that IP somehow and crawl for folders if its shared. I have no idea how I would do this though, and I still doubt its possible. Any advice? Any alternative ideas if this isnt possible? Also what is a good way to explain to my boss this is not possible without sounding like I dont know what Im talking about? Since, really I dont know much about networks so I dont know if theres some fancy way I can grab said information. Any help would be grand. Quote Link to comment Share on other sites More sharing options...
shlumph Posted March 25, 2010 Share Posted March 25, 2010 If you set up the web server so it can mount to the shared locations, it will be possible. I would recommend only mounting to other dedicated servers, though, not client PC's that aren't always on. Quote Link to comment Share on other sites More sharing options...
ajlisowski Posted March 25, 2010 Author Share Posted March 25, 2010 I was not the one who set up the set up the web server. Im relatively inexperienced with linux and apache, though Im learning. I assume the mounting would have to be done on the server itself, I couldnt run PHP code which mounts to a drive could I? I suppose I could run shell commands via php to mount to the drive then go from there. However, is there anyway to have PHP get the IP address of the user and then grab shared data from there? Everyone would be on the same network...but it just doesnt seem like it would be possible. Quote Link to comment Share on other sites More sharing options...
shlumph Posted March 25, 2010 Share Posted March 25, 2010 Yeah... that's probably not possible, assuming the clients have firewalls on their machines, etc. The best way to mount the web server to other network shares would be to log into the web server (either directly or via SSH). Then you could distribute the files across all of the connected network shares. I'm not even sure if this is the best solution, though. Maybe consider building a SAN if storage is a problem. Or even just a large fileshare somewhere. Mount that large fileshare on the webserver to a folder, and then when uploading files place them in that mounted folder. Quote Link to comment Share on other sites More sharing options...
ajlisowski Posted March 25, 2010 Author Share Posted March 25, 2010 Yeah, I was just experimenting a bit with our network and mounting on my VM. I think the best solution would be to simply create a fileshare, or a folder within an existing share, and have the server admin have the apache server mount to it. This way I dont have to have shell access for the PHP scripts to mount, and I dont have to worry about trying to mount to someone a folder which may not be shared, and may not even be there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.