Module: Store Files on Disk
Posted by Maurice Makaay
Re: Module: Store Files on Disk April 22, 2010 06:12PM |
Admin Registered: 20 years ago Posts: 8,532 |
I don't think that the version of PHP and MySQL should be a factor here. Did you check the permissions on the subdirectories and files in those subdirectories?
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Store Files on Disk April 23, 2010 01:03AM |
Registered: 17 years ago Posts: 37 |
Thanks Maurice
I tried for an entire directory and subdirectory and all the files in there, but it still does not work.
The only thing I see is that the pictures, when sent through the module, are owned by 99 (the system?) while the pictures uploaded through FTP of my backup are owned by me, the user. Could that be an issue?
I tried for an entire directory and subdirectory and all the files in there, but it still does not work.
The only thing I see is that the pictures, when sent through the module, are owned by 99 (the system?) while the pictures uploaded through FTP of my backup are owned by me, the user. Could that be an issue?
Re: Module: Store Files on Disk April 23, 2010 02:42AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Module: Store Files on Disk April 23, 2010 01:37PM |
Registered: 17 years ago Posts: 37 |
Re: Module: Store Files on Disk April 23, 2010 01:53PM |
Admin Registered: 20 years ago Posts: 8,532 |
Only the root user on the system is allowed to change file ownership. However, the script does not have code in it to disallow access to the files when it's not owned by the correct user. As long as the files are readable for the web server, things should work.
Of course, it would not hurt if the files were owned by the web server user. But if you are hosting with a hosting provider, you'd have to request their support for help on making this work.
If you like, I could take a peek at your system. If you want me to do that, please PM me the ftp-server and account details. Shell access would be even better, but that's normally not provided with hosting accounts. Also provide an example URL where I can see a broken image in action.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Of course, it would not hurt if the files were owned by the web server user. But if you are hosting with a hosting provider, you'd have to request their support for help on making this work.
If you like, I could take a peek at your system. If you want me to do that, please PM me the ftp-server and account details. Shell access would be even better, but that's normally not provided with hosting accounts. Also provide an example URL where I can see a broken image in action.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Store Files on Disk April 23, 2010 04:44PM |
Admin Registered: 20 years ago Posts: 8,532 |
Released version 1.1.1 of the module.
I changed the file path generation code to use gmstrftime() instead of strftime(). Because strftime() dependens on the server timezone, changing the server timezone resulted in changed file storage path and broken file downloads as result.
Files will be automatically converted to the new storage path on access. It is possible to use the console_convert.php script (which is a command line script) to speed up this process.
Note:
The automatic conversion from the 1.1.0 release will also be performed, so you can upgrade directly to this release when coming from a pre-1.1.0 version.
Do I have to upgrade?
You do not strictly have to upgrade, but it's advisable to do so, especially when you are going to move the forum to a different server (in which the timezone could differ from the timezone of the current server). When the server's timezone setting does not change, then there's no problem.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
I changed the file path generation code to use gmstrftime() instead of strftime(). Because strftime() dependens on the server timezone, changing the server timezone resulted in changed file storage path and broken file downloads as result.
Files will be automatically converted to the new storage path on access. It is possible to use the console_convert.php script (which is a command line script) to speed up this process.
Note:
The automatic conversion from the 1.1.0 release will also be performed, so you can upgrade directly to this release when coming from a pre-1.1.0 version.
Do I have to upgrade?
You do not strictly have to upgrade, but it's advisable to do so, especially when you are going to move the forum to a different server (in which the timezone could differ from the timezone of the current server). When the server's timezone setting does not change, then there's no problem.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Store Files on Disk February 15, 2011 09:26PM |
Registered: 13 years ago Posts: 2 |
Just tried out the module which works pretty fine for me.
As I dig into the source code however. I found that the module utilizes hooks that are not documented in the developer manual. What I am looking for right now is a module that can consume the output from this one and add watermarks to image files and then output back to Phorum.
Maurice, could you please instruct if there's any existing modules to adopt or, if I have to implement it myself, any hooks I'd be using.
I'm new to Phorum. Please be as detailed as possible. Thanks.:)
As I dig into the source code however. I found that the module utilizes hooks that are not documented in the developer manual. What I am looking for right now is a module that can consume the output from this one and add watermarks to image files and then output back to Phorum.
Maurice, could you please instruct if there's any existing modules to adopt or, if I have to implement it myself, any hooks I'd be using.
I'm new to Phorum. Please be as detailed as possible. Thanks.:)
Re: Module: Store Files on Disk February 16, 2011 12:22AM |
Admin Registered: 20 years ago Posts: 8,532 |
Are you using this module to get the water marks done? That would be a bad idea. Water marking should be possible when using the default database-driven file storage too.
There is a water marking module. You might want to look at that one. I see some reports about it not working on some releases, but I don't know to what extends the issues were local for the people that reported them.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
There is a water marking module. You might want to look at that one. I see some reports about it not working on some releases, but I don't know to what extends the issues were local for the people that reported them.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Store Files on Disk February 16, 2011 10:32PM |
Registered: 13 years ago Posts: 2 |
Hi Maurice,
No, I'm not to use this module to get watermarks, but the output from this module to feed to another that is supposed to generate watermarks.
Yes, I've tried that module a while ago but it's not working for me. Plus, even if it worked, it wouldn't have satisfied my needs where watermarks are generated and merged into the image files only when files are being retrieved, i.e. the files stored on the disk should be clean without watermarks, as opposed to marking the files once they're uploaded.
Wondering if there's any detailed manual exposing all known hooks and apis. The existing one on the web is somewhat incomplete.
Huge thanks.
No, I'm not to use this module to get watermarks, but the output from this module to feed to another that is supposed to generate watermarks.
Yes, I've tried that module a while ago but it's not working for me. Plus, even if it worked, it wouldn't have satisfied my needs where watermarks are generated and merged into the image files only when files are being retrieved, i.e. the files stored on the disk should be clean without watermarks, as opposed to marking the files once they're uploaded.
Wondering if there's any detailed manual exposing all known hooks and apis. The existing one on the web is somewhat incomplete.
Huge thanks.
Re: Module: Store Files on Disk February 17, 2011 02:58AM |
Admin Registered: 20 years ago Posts: 8,532 |
Historically, we did not have a hook documentation system. This is something that we added a while ago. All new hooks are added to the code including the new documentation blocks. For old hooks, we need to write the documentation hook by hook. That has not yet been done for all hooks.
You are looking at "output from this module". That is not what you want to look at. You need to hook into the file retrieval process, not into a module that takes care of alternative storage. An on-the-fly watermarking module should be independent of the way in which the files are stored on the system.
The hook that you want to look into, is the "file_after_retrieve" hook. This one is called by the File API (well, the name kind of tells already ;-) after retrieving a file. You can find it in include/api/file.php at line 882. This is the hook that can be utilized for mangling file data before sending it to the client.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
You are looking at "output from this module". That is not what you want to look at. You need to hook into the file retrieval process, not into a module that takes care of alternative storage. An on-the-fly watermarking module should be independent of the way in which the files are stored on the system.
The hook that you want to look into, is the "file_after_retrieve" hook. This one is called by the File API (well, the name kind of tells already ;-) after retrieving a file. You can find it in include/api/file.php at line 882. This is the hook that can be utilized for mangling file data before sending it to the client.
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.