[RFC] Outside data stored outside forum directory

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
simpleton
Registered User
Posts: 4
Joined: Sun Apr 18, 2010 11:38 pm

[RFC] Outside data stored outside forum directory

Post by simpleton »

I like to try and keep data separated from forum software files so as to more easily upgrade, backup data, etc. For the database this is no problem. For attachments, this can also be done by changing the attachments directory to one outside of the forum software ('../data/files' for instance or even an absolute path) since downloading the attachments is done by PHP. Could this ideally be supported by any data files such as user uploaded avatars, etc?

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Post by igorw »

I would take this a step further and provide an abstraction for attachments, so that they can be stored and retrieved from any source.

ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: [RFC] Outside data stored outside forum directory

Post by ToonArmy »

eviL3 wrote:I would take this a step further and provide an abstraction for attachments, so that they can be stored and retrieved from any source.
This is on the table already, for cloud storage. I'll let Henry comment further.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Outside data stored outside forum directory

Post by Oleg »

On a semi-related note I would like to see cache directory path being configurable, perhaps in config.php, for security reasons. It's different from files and store (I think) in that it does not actually need to be under webroot, and it routinely contains executable php code with world-write permission bits.

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Post by igorw »

nn- wrote:On a semi-related note I would like to see cache directory path being configurable, perhaps in config.php, for security reasons. It's different from files and store (I think) in that it does not actually need to be under webroot, and it routinely contains executable php code with world-write permission bits.
Yes, this would decouple the file cache because it would no longer be dependent on $phpbb_root_path. I suggest passing the path as a constructor, the $cache instance being created in config.php.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Outside data stored outside forum directory

Post by naderman »

In config.php? That file should do anything but set a few settings.

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Outside data stored outside forum directory

Post by bantu »

Why not make it so you can define paths in config.php, allowing absolute and relative paths.
naderman wrote:In config.php? That file should do anything but set a few settings.
+1

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Post by igorw »

Because only file-based cache modules need a path. By allowing the user to create the instance he can provide any information his selected module needs.

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Outside data stored outside forum directory

Post by bantu »

eviL3 wrote:Because only file-based cache modules need a path. By allowing the user to create the instance he can provide any information his selected module needs.
Well ... the same is true if you define everything as a constant in config.php. config.php is really not supposed to do anything but hold information.

Let's see with what henry comes up.

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Post by igorw »

I guess you could come up with a complex way to configure the cache. But there's no way you can predict the arguments the module will need. Creating the instance directly seemed like the simplest and most flexible way to do it. Of course, it's just a suggestion.

Post Reply