vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Attachments as files (https://vborg.vbsupport.ru/showthread.php?t=35193)

todd.o.callen 10-16-2003 08:58 PM

Update: We restarted the mySQL service, and this didn't help. On a hunch, I deleted some bogus threads with attachments, and this seemed to unlock the problem, at least temporarily. I think there have been more successful attachments than I deleted added since then, so I seriously doubt that there was some magic ceiling number out there, but I will continue to watch it carefully.

gmarik 10-19-2003 04:48 PM

So it is working no problemo on 2.3 and I could upload my board to 3.0, not loosing the attachment info, correct?!

PAINTBALLM 10-21-2003 04:51 AM

I have a question, how exactly will I be able to upgrade to VB3 when the gold is released without loosing any attachments... Please instruct me, thanks!!!!

Also, I am confused about something, when I post 2 posts with attachments right after each other if the comments are the same for both posts, it erased the post I just posted.. Or it will save it but use the picture that the last post used...

But if I put "." in my first post and upload 1_pic.jpg in that post... Then put "...." in my second, with 2_pic.jpg, it will work fine.. The description/comments for the post just has to be different. How can I fix this? Sometimes when my users post pics, they just wanna put a - or a . beacuse its a pic only.. In vb3 we wont have to worry about this, but for now we do.

ontherun 11-22-2003 12:09 AM

I'm a little confused here, this thread started out Attachments as files and I see where
somewhere along the way multiple file attachments per thread was added.

MaN hOW cOnFuSiNg when trying to figure out how to do anything with each of the different hacks.
one post is about the original and the next is about a similar but different hack. How the
heck do you keep it ...................(just my rant ... I'm to organized I guess)

I really came back to this area to find some help to remove the ORIGINAL Attachments as files
hack that allowed files to be stored in a folder not the database. You see I have been running
it for a long time.

I want to move to vB 3.0, but to do this you have to get the files back into your database.
Now if one of you good users or vB pro's can point me in the right direction I would be forever
grate full................

I see that there are 2 php files one is the installer that will do a uninstall, but it does not reset the db or move the files back into the db.

attachment_install.php - the file that was used to install the hack
attachment_upgrade.php - the (fix) filke that you can put the files back into the db

The 2nd one is supposed to put your files back into the db, but all I ever get from this file is php errors about files and line numbers that are not there.

So I you can help PLEASE show me the way.........................to get the files back into the db.

Thanks

One toke over the line ..........in this thread

ontherun 11-23-2003 12:12 AM

I have gotten down to the point where attachment_upgrade.php appears to run and then quites with this error.

Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 2885154 bytes) in /var/www/html/forums/admin/db_mysql.php on line 245

Line 245:
echo "<form><textarea rows=\"12\" cols=\"60\">".htmlspecialchars($message)."</textarea></form>";

The current db is only 4MB and and the attachment folder only holds 95.5 MB

HELP!

Any solutions sure would be helpful.

Thanks

ontherun 11-23-2003 04:04 AM

Quote:

Originally Posted by Scott MacVicar
It will make upgrading to vB3 a problem as your attachments will be files but they will expect it to be in database, but I'll be rewriting the hack for v3 so there won't be a problem about upgrading. You upgrade as normal then apply the new version of the hack to make it work with 3.0


Ok we have followed, read and posted until my fingers hurt.

PLEASE ............. I need to get the files back into the db

I have added the filedata table

ALTER TABLE attachment ADD filedata mediumtext NOT NULL

I have used attachment_install.php and did a uninstall

I have ran the attachment_upgrade.php

Nothing is working ......... I need to get the files back to the db so I can roll vB 2.3.0 to vB 3.0 beta 7

ontherun 11-23-2003 04:24 AM

How about a few lines to let us know that your alive and still around?

DO I ?????????

1st - run the attachment_install.php and uninstall the hack

2nd - run the attachment_upgrade.php to get the files back to db.

We have remove all other hacks and vbportal and site is running great...........but we can upgrade to 3.0 until we get the files back into the db.

bitbender 11-29-2003 10:07 PM

Hello All,

I just rebuilt my VB 3.0 from Beta 7,with VB 2.3.0 as input to verify the 'documented' attachments procedure I had used before(for my own sanity). I had not yet read the other methods beyond attachment_upgrade.php. I used a new data base, and a seperate directory structure for VB 3.0. The reason I do things this way is that the test and live Board are really two different virtual sites on on my rack, so they have differnt HTML structures. It also helps to make sure I don't stomp on my live board, because it uses a different DB names and users.

I'd like to know if the way I'm doing it is backwards, or ok. Seems to be working ok, but I have not yet tested using the file system store in VB3.0.
  1. Copy live VB directories to a dummy set, ie vb23
  2. Update vb23/admin/config.php to reflect new data base name bitbender_vb30
  3. Backup "live" DB using mysqldump from SSH
  4. Drop data base name bitbender_vb30 using MySqlAdmin from SSH
  5. Create data base name bitbender_vb30 using MySqlAdmin
  6. Grant Permissions to Db User using MySqlAdminfrom SSH
  7. Restore to data base name bitbender_vb30 from backup using MYSQL from SSH
  8. Used PhpMyAdmin and edited data base name bitbendertest_vb30 to;
    • ALTER TABLE attachment ADD filedata mediumtext NOT NULL
    • Change the settings field attachpath to point to correct directory structure /html/vb23/attach_archive
  9. Ran REPAIR.PHP against the data base bitbendertest_vb30 from the vb23/admin folder
  10. Copied attachment_upgrade.php to my vb23/admin folder
  11. Edit the attachpath within the exec to ensure it is the same as attachpath above
  12. Copied the attachment directory from live board to duplicate VB 2.3.0 structure /html/vb23/attach_archive
  13. I had some server Issues - (you may NOT need to do this part);
    • Altered PHP.INI to allow for 360 seconds max execution
    • 16M total script consumption.
    • Adjusted my.cnf in /etc to allow a max_allowed_packet=4M
    This was required due to the size of some of the crap in my attachment folder. Because I had to make adjustments, I needed to restart some stuff.
    • Stopped apache
    • Stopped MySQL
    • Started MySQL
    • Started Apache
  14. Ran /html/vb23/admin/attachment_upgrade.php This took about 15 mins for me (575Megs of attachments)
  15. Uploaded VB 3.0 Beta 7.0 to VB30 folder
    • ===>vb30
    • ======>/admincp
    • ======>/ and so on
  16. Altered vb30/includes/config.php for new DB user and data base name bitbender_vb30
  17. Ran vb30/install/upgrade.php
  18. Once all done and working, delete /vb23 directory

And it worked. If you would like to see, let me know, and I can issue a guest id to let you see. Now, since we can put a worm on a hook ten ways and a fish will still bite, who knows.. comments any one??

DaveRobbo 01-21-2004 08:19 AM

Is there still any support for this hack? I have a few questions...

Firstly I would like to know if this supports attachments with the same name? If one user uploads a picture called "image.gif" followed later by another user uploading a different attachment with the same name, does the original get overwritten? Or is this handled correctly?

Also, what is the best way to maintain and prune these attachments? If I go to the upload folder and delete the attachments I no longer wish to keep, is the code smart enough to notice or will my pages be full of the dreaded "little red X" ?

Alternatively is there another way of maintaining the attachment store? On our forum we don't wish to do regular complete purges of attachments - there are some old ones we may wish to retain (semi-)permanently but others we wish to purge out regularly.

Any help would be much appreciated - our current attachment datebase is rapidly getting out of hand!

I used to use the old "admin functions" hack which allowed attachments to be deleted from the database from ACP - but because of a change in my ISP's caching/proxy strategy, this now has to reload the list page everytime rther than returning to a cached version and so it has become almost impossibly slow to go through and selectively delete many attachments.

Dave

DaveRobbo 01-22-2004 01:42 PM

Anyone???


All times are GMT. The time now is 03:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01726 seconds
  • Memory Usage 1,756KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete