[RFC] Outside data stored outside forum directory
[RFC] Outside data stored outside forum directory
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?
Re: [RFC] Outside data stored outside forum directory
I would take this a step further and provide an abstraction for attachments, so that they can be stored and retrieved from any source.
Re: [RFC] Outside data stored outside forum directory
This is on the table already, for cloud storage. I'll let Henry comment further.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.
Re: [RFC] Outside data stored outside forum directory
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.
Re: [RFC] Outside data stored outside forum directory
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.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.
Re: [RFC] Outside data stored outside forum directory
In config.php? That file should do anything but set a few settings.
- bantu
- 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
Why not make it so you can define paths in config.php, allowing absolute and relative paths.
+1naderman wrote:In config.php? That file should do anything but set a few settings.
Re: [RFC] Outside data stored outside forum directory
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.
- bantu
- 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
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.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.
Let's see with what henry comes up.
Re: [RFC] Outside data stored outside forum directory
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.