Firefox PHP

Module: Store Files on Disk

Posted by Maurice Makaay 
Re: Module: Store Files on Disk
April 17, 2008 05:38PM
this is because Phorum still things that it should store data in the database. You can trick Phorum by hacking the db layer code. Edit include/db/mysql.php. Find the function below and add the green code:
function phorum_db_maxpacketsize()
{
    return NULL;  

   $maxsize = phorum_db_interact(
   ...etc...


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Store Files on Disk
April 21, 2008 11:52AM
Helllo

Thank you for your help. However nothing has been solved yet. Here are the results of my attempts.

1. Hacking the db layer code changes the file size limit from 613K (the database setting) to 16M (the PHP setting).

2. Files are still stored in the database. But how is it possible since the database setting doesn't allow files exceeding 613K ?!!

3. Apparently files are not stored on the disk. Each time I join a file to a message, a directory tree is created under the path of the file storage directory (while the file is also stored in the database). But when I remove the file directly from the database, it is no longer possible to download the file attached to the message : "The requested file was not found." says Phorum. So can we deduce that the file is not on the disk?

I have activated the event logging system but it doesn't give any more information.
Re: Module: Store Files on Disk
April 21, 2008 02:11PM
each file still needs an entry in the files table, never delete that!
its content itself will be stored on disk then, not in the database but the database needs to contain the "metadata" about the file. Therefore I'm not sure what you are looking at or seeing at all.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: Store Files on Disk
April 21, 2008 05:28PM
Sorry, there was no problem, I just haven't noticed that the "file data" field of the database is empty.

The database just stores the file metadata and the file data are stored on the disk: this module meets all my needs.

Thanks a lot for your efficient support. This is also why I have chosen Phorum.

Regards

Patrice B.
Re: Module: Store Files on Disk
April 30, 2008 09:29AM
Than you very much and congratulations for this module. It is very usefdull for me as the provider free.fr does not allow file in database.

Regards,
sms.
Re: Module: Store Files on Disk
May 01, 2008 09:12AM
I wonder how they would take care of that exactly... Maybe by limiting the database server in a really conservative way or so. Anyway, glad to be of service. Have fun with the mod! :-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
How to run [console_convert.php] if shell is not available?
June 15, 2008 08:52PM
Maurice,

Is it possible to run [console_convert.php] somehow if shell is not available?
I'm need to Extract files from DB on server, because DB allready 1Gb and support gone to hyperspace (hosting provider closing his service w/o any comments). I'm trying to leave this hosting, but to dump DB w/o shell (by phpmyadmin) is not possible with 1Gb of DB.

Thanks,
Alex

Alexander Medentsev. Moscow. Russia.



Edited 1 time(s). Last edit at 06/15/2008 08:53PM by Alexander Medentsev.
Re: Module: Store Files on Disk
June 15, 2008 08:54PM
it won't help you to run the script as it will time out through the browser with that many files.
try mysqldumper to get the full database - [mysqldumper.de] .
Its a great tool for this case.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: Store Files on Disk
June 15, 2008 09:05PM
Thomas,

I've done dump w/ EMS Data Export 2005 for MySQL Server, but support from new hoster can't upload it to the server due to some issues with DB version and maximum allowed packet size... and new server not accessible from external servers...
And now i'm trying to minimize DB size to solve support's issues...

I'll take a look to MySQLDumper. Thanks.

Alexander Medentsev. Moscow. Russia.



Edited 1 time(s). Last edit at 06/15/2008 09:08PM by Alexander Medentsev.
Re: Module: Store Files on Disk
June 15, 2008 10:22PM
One thing you can do with big database upgrades, is to have a Phorum install running locally (e.g. by installing XAMPP and Phorum on a Window machine). Then you can change the include/db/config.php to point at the remote database. If your local Phorum software matches the remote software (important for this), then the updates can be done through this route.

Of course the hosting provider should allow you to setup a connection to your database from your home network. Otherwise, you are pretty .. eh... doomed.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login