topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 21, 2019, 03:58 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Simple php website for hosting files  (Read 418 times)

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 546
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Simple php website for hosting files
« on: August 21, 2019, 07:32 PM »
Looking for the simplest possible way to display a folder along with all of its subfolders including the pdf files in those folders on a webpage.  It needs to have enough controls to allow Wthe Webpage viewers to have read-only access and prevent write/edit except and should require a login and password from Users to access the site.

Essentially this is an electronic version of a filing cabinet with controlled access.
More simply i guess it is an EBook where the individual pages are each separate files

We already have such a program but it includes too many unnecessary features and cannot be loaded using Windows drag and drop due to the inclusion of a MySql database which requires each document to be separately loaded into it through the loader which then tracks all access , a feature we do not need. 

I have tried using Business OneDrive as well as Google drive for this and while it can be done that way, I was not happy with the provisions for controlled access.  And we would prefer keeping the posted documents locally rather that hosted from the cloud

The hosted side should be something where the folder and its files can be loaded using Windows drag and drop into the display area and the whole thing has to be compatible with a WAMP-type Apache Web Host.

Appreciate any guidance.  I am hoping someone might have seen something like this and can point me to the right product

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 8,813
    • View Profile
    • Donate to Member
Re: Simple php website for hosting files
« Reply #1 on: August 21, 2019, 08:56 PM »
Directory Lister is a fairly simple PHP "file browser" that you may find useful. It doesn't have access controls, though. But I suspect you could enforce authentication with a simple .htaccess file.
« Last Edit: August 21, 2019, 09:01 PM by Deozaan »

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 546
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Simple php website for hosting files
« Reply #2 on: August 22, 2019, 12:27 AM »
Thanks Deozaan!  Advice like yours is exactly the kind I was hoping for.  I have used htaccess before with good results and you are probably correct in it being able to handle the "front gate".   This isn't a high security issue. 
I will definitely look at Directory Lister because that is exactly what I am trying to do.  If it can display the contents of a folder with its subfolder and files structures just as Windows does that is all we need.  Hopefully it protects against uploads or modification of contents but downloads are fine  Just trying to limit the people who can access and read the files inside. 
 

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,578
    • View Profile
    • Donate to Member
Re: Simple php website for hosting files
« Reply #3 on: August 22, 2019, 01:51 AM »
Not really simple with regards to capabilities, but simple enough to install quickly on the server that hosts the files. Try Nextcloud. User management and (read-only) access to files can be pretty fine-grained. There is a community and enterprise version. i run the community version for quite some time now and it doesn't disappoint.

Caveat: I run it on a Linux server with a 12 year old Core Duo (Dual core) processor and only 2 GByte of RAM. Still, it runs just fine for about 15 people.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,232
    • View Profile
    • Donate to Member
Re: Simple php website for hosting files
« Reply #4 on: August 22, 2019, 05:11 AM »
Not suitable due to your requirement for integrating with WAMP/LAMP but when I've had to quickly do something like this, host files over the web from my computer, then I've always found the simplest to be HTTP File Server (HFS).

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 546
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Simple php website for hosting files
« Reply #5 on: August 22, 2019, 11:18 AM »
Two more good ones.  I knew 4WD would have at least one of these proggies in his toolbox. 
I am still reading the FAQ and Help pages on HFS but it looks promising.  I dont really care about using the Apache software, but at least that box has the required static IP with a domain name mapped to it.  From what i see HFS does need to have those.

What we have been using was a document manager I came up with 8 years ago.  It  has served well (and still does) but the girls wanted to load it by drag and drop instead of the configured PHP loader for the MySql database.

Me and the other IT guy as well as some outside people tried several different D&D modules but nothing seemed to click.  So I started looking at the back-ups of all the completed projects and realized that seen from the backend,
all they wanted was a way to display a Windows directory structure with folders and files on a webpage where the Users would be able to read the files inside of their labelled folders.

It needs some kind of basic Login\PW as an attempt to keep out the general public but they didn't need to keep track of any of the Users other than that.  The Doc Mgr using that sed a full PHP/MySql engine was overkill by a huge amount.  Trying to take apart an automobile and use the parts to make a  bicycle just didn't seem like a practical idea.  :mad:

I had considered giving the users access through a vpn and using Windows built-in share controls for managing access levels.   But...I would rather keep outside users "Outside" if possible and we already had the apache web-server configured so...I hated to waste that.

Shades, I see that NextCloud would require me to load the box with Linux or create a VM to host a Linux OS ?.  Or have i not read the instructions thoroughly enough?  Next Cloud looks very much like a Linux version of what used to be BitTorrent.  ( I believe they are now Resilio)

Thanks to all for the great ideas.  One of these will surely work for what they are trying to do.