phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC] Outside data stored outside forum directory

Publish your own request for comments or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.1/Ascraeus and 3.2/Arsia.

[RFC] Outside data stored outside forum directory

Postby simpleton » Mon Apr 19, 2010 12:22 am

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?
simpleton
Registered User
 
Posts: 4
Joined: Sun Apr 18, 2010 11:38 pm

Re: [RFC] Outside data stored outside forum directory

Postby igorw » Mon Apr 19, 2010 8:15 am

I would take this a step further and provide an abstraction for attachments, so that they can be stored and retrieved from any source.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Postby ToonArmy » Mon Apr 19, 2010 9:56 am

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
User avatar
ToonArmy
Registered User
 
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK

Re: [RFC] Outside data stored outside forum directory

Postby Oleg » Mon Apr 19, 2010 11:21 am

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.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Outside data stored outside forum directory

Postby igorw » Mon Apr 19, 2010 12:45 pm

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
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Postby naderman » Mon Apr 19, 2010 12:47 pm

In config.php? That file should do anything but set a few settings.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Outside data stored outside forum directory

Postby bantu » Wed Apr 21, 2010 4:53 pm

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
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 436
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Re: [RFC] Outside data stored outside forum directory

Postby igorw » Wed Apr 21, 2010 5:20 pm

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
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Outside data stored outside forum directory

Postby bantu » Wed Apr 21, 2010 5:22 pm

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.
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 436
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Re: [RFC] Outside data stored outside forum directory

Postby igorw » Wed Apr 21, 2010 5:29 pm

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.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Next

Return to [3.x] RFCs

Who is online

Users browsing this forum: No registered users and 8 guests