Module: Store Files on Disk
Posted by Maurice Makaay
September 15, 2008 02:17PM |
Registered: 19 years ago Posts: 609 |
I got one more question ......... it the last one I promise! Ha!
When I tried to delete stale files in admin and it failed delete the stale files on the disk because of permission issue however it did delete all the link to the files on disk in DB. Is there a way to start over or to find all the stale file on disk to delete them?
It really a bunch like maybe 500 meg worth and would be nice to get rid of it somehow but if it not going to harm anything leaving it on disk with no link to it anymore from DB then I probably just let it be.
Bill
When I tried to delete stale files in admin and it failed delete the stale files on the disk because of permission issue however it did delete all the link to the files on disk in DB. Is there a way to start over or to find all the stale file on disk to delete them?
It really a bunch like maybe 500 meg worth and would be nice to get rid of it somehow but if it not going to harm anything leaving it on disk with no link to it anymore from DB then I probably just let it be.
Bill
Re: Module: Store Files on Disk September 15, 2008 03:28PM |
Admin Registered: 22 years ago Posts: 9,240 |
September 15, 2008 05:25PM |
Admin Registered: 20 years ago Posts: 8,532 |
There's no harm in leaving them on disk.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



October 09, 2008 10:14AM |
Registered: 16 years ago Posts: 98 |
Folks,
I have a question about this mod.
What happens if I turn on the mod for a while, everything gets converted, and then I want to turn it off and go back to using the DB?
Is this even possible, or is the conversion strictly a one-way street?
Sp
------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
I have a question about this mod.
What happens if I turn on the mod for a while, everything gets converted, and then I want to turn it off and go back to using the DB?
Is this even possible, or is the conversion strictly a one-way street?
Sp
------------------------
Sean Phelan

October 09, 2008 10:30AM |
Registered: 16 years ago Posts: 98 |
One other question/problem, more pressing.
I'm trying to install this mod - unpacked, directory set, turned on.
It seems to be working for existing pictures (I see the files being created on disk as I read the posts)
BUT I'm still out luck for uploading new pictures bigger than 613KB. I get the standard "No file can be larger than 613.8 KB" error.
I've changed General Settings -> File Uploads -> Max File Size to 2000 KB, and the forum setting for my test forum is set to 2000 as well.
I ran a phpinfo() and see that upload_max_filesize is 4194304 (4GB?)
I also notice that the phorum sanity check still warns of the 613KB DB limit, even though the SFOD module is turned on.
What am I missing? Is there another setting in the way?
------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
I'm trying to install this mod - unpacked, directory set, turned on.
It seems to be working for existing pictures (I see the files being created on disk as I read the posts)
BUT I'm still out luck for uploading new pictures bigger than 613KB. I get the standard "No file can be larger than 613.8 KB" error.
I've changed General Settings -> File Uploads -> Max File Size to 2000 KB, and the forum setting for my test forum is set to 2000 as well.
I ran a phpinfo() and see that upload_max_filesize is 4194304 (4GB?)
I also notice that the phorum sanity check still warns of the 613KB DB limit, even though the SFOD module is turned on.
What am I missing? Is there another setting in the way?
------------------------
Sean Phelan

October 09, 2008 10:50AM |
Admin Registered: 20 years ago Posts: 8,532 |
You cannot convert back. It's one way. Unless you write a tool to convert the data back to the database. We see this as an expert module for people who are very sure that they want and need the files stored on disk. Database file storage has a lot of advantages and should be fine for most installations.
Is your problem the storage of larger files? Is that the reason why you switch to file storage? The solution would be to not switch to file storage and to increate the mysql max packet size to make it accept larger files.
If you want to go with disk storage, then you could try to hack the database layer as already was explained in this very thread. See this posting.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Is your problem the storage of larger files? Is that the reason why you switch to file storage? The solution would be to not switch to file storage and to increate the mysql max packet size to make it accept larger files.
If you want to go with disk storage, then you could try to hack the database layer as already was explained in this very thread. See this posting.
Maurice Makaay
Phorum Development Team



October 09, 2008 11:13AM |
Registered: 16 years ago Posts: 98 |
Maurice,
Thanks for the info. My problem is a bit of both. Primarily, it's the need to store larger files, but pair.com support tells me that the 1M packet size is enforced at the DB level, so I don't think I have a DB option.
Do I need to do that DB hack to let Phorum accept a larger file via the SFOD module?
Also, has anyone considered enhancing the store-on-DB approach to accommodate multiple rows per image? That would dispose of the size limit for everybody, I'd think.
Sp
------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
Thanks for the info. My problem is a bit of both. Primarily, it's the need to store larger files, but pair.com support tells me that the 1M packet size is enforced at the DB level, so I don't think I have a DB option.
Do I need to do that DB hack to let Phorum accept a larger file via the SFOD module?
Also, has anyone considered enhancing the store-on-DB approach to accommodate multiple rows per image? That would dispose of the size limit for everybody, I'd think.
Sp
------------------------
Sean Phelan

October 09, 2008 01:47PM |
Admin Registered: 20 years ago Posts: 8,532 |
Quote
Do I need to do that DB hack to let Phorum accept a larger file via the SFOD module?
Yes. A core change would be needed to let a file storage backend module override the maximum file size. We might take a look at that for a future release. For now, db layer hacking is unfortunately the only solution.
Quote
Also, has anyone considered enhancing the store-on-DB approach to accommodate multiple rows per image? That would dispose of the size limit for everybody, I'd think.
I considered it, but the idea was never turned into code. To me, it would be useful if we'd have to store files that are larger than the available space in the file data field. Since MySQL configuration can make storing larger files possible, I see it as less urgent. Of course, this can be cumbersome when a hosting provider is reluctant to tweaking the MySQL server configuration. One might ask himself if a different hosting provider would be better in such case.
Maurice Makaay
Phorum Development Team



October 10, 2008 10:56PM |
Registered: 16 years ago Posts: 98 |
> One might ask himself if a different hosting provider would be better in such case.
I'd be moving from pair.com to somewhere else - I've never found a host with a rep to match theirs.
Of course, their reliability is due to their ultra-conservative management approach - which is why the packet size is kept so small.
------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
I'd be moving from pair.com to somewhere else - I've never found a host with a rep to match theirs.
Of course, their reliability is due to their ultra-conservative management approach - which is why the packet size is kept so small.
------------------------
Sean Phelan

October 11, 2008 10:23PM |
Registered: 16 years ago Posts: 98 |
Folks,
I'm looking for a little perspective on this error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3264 bytes) in /path/to/phorum-5.2.7/include/api/image.php on line 235
This shows up when the topic is trying to show the thumbnail ... but the "open image URL" link still leads to the full size of the picture in general.
The original picture was about 3MB. The original upload obviously worked, but apparently the thumbnail creation takes too much memory.
The part that confuses me here is the memory size ... that error is talking about 33MB or so, for resizing a picture that was only 3MB at full size.
Looking at the code, line 235 is:
I'm assuming that GD is pretty inefficient with memory?
And, without going for a custom php-build, should I try to coax the system to fall back to imagemagick command-line convert? I see that the code is ready for it.
Any advice is welcome here. As always, I'm trying to hack the core code as little as possible.
Thanks!
Sp
------------------------
Sean Phelan
Sites By Sequoia - Web Marketing ... The Experts at Building Your Success Online
I'm looking for a little perspective on this error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3264 bytes) in /path/to/phorum-5.2.7/include/api/image.php on line 235
This shows up when the topic is trying to show the thumbnail ... but the "open image URL" link still leads to the full size of the picture in general.
The original picture was about 3MB. The original upload obviously worked, but apparently the thumbnail creation takes too much memory.
The part that confuses me here is the memory size ... that error is talking about 33MB or so, for resizing a picture that was only 3MB at full size.
Looking at the code, line 235 is:
Language: PHP$original = imagecreatefromstring($image);
I'm assuming that GD is pretty inefficient with memory?
And, without going for a custom php-build, should I try to coax the system to fall back to imagemagick command-line convert? I see that the code is ready for it.
Any advice is welcome here. As always, I'm trying to hack the core code as little as possible.
Thanks!
Sp
------------------------
Sean Phelan

Sorry, only registered users may post in this forum.