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)

shorty 08-07-2003 02:45 PM

Perfecto mondo. BB you never cease on enthuiasm :D

Im gonna hack the attachments out of Short-Media's 2.3.0 until VB3 is ready and then I shall use your (now bookmarked) guide to getting them back in for the upgrade ;)

Sweet! Gonna dump 250mb of attachments into the filesystem.. take that FreeBSD :p

Mistah Roth 09-21-2003 07:27 PM

Alright I installed the vb3 Attachments hack a while back - the one that lets you post multiple attachments and such. Now I just installed this hack as well, and low and behold the two conflict with each other.

The thing is, old attachments work fine after I did that scan thing to them all, but when I try to post new attachments I get a bunch of errors:

Quote:

Warning: filesize(): Stat failed for /home/virtual/site4/fst/var/www/html/attachments/.file (errno=2 - No such file or directory) in /home/virtual/site4/fst/var/www/html/attachment.php on line 59

Warning: fopen(): Unable to access /home/virtual/site4/fst/var/www/html/attachments/.file in /home/virtual/site4/fst/var/www/html/attachment.php on line 60

Warning: fopen(/home/virtual/site4/fst/var/www/html/attachments/.file): failed to open stream: No such file or directory in /home/virtual/site4/fst/var/www/html/attachment.php on line 60

Warning: fread(): supplied argument is not a valid stream resource in /home/virtual/site4/fst/var/www/html/attachment.php on line 61

Warning: fclose(): supplied argument is not a valid stream resource in /home/virtual/site4/fst/var/www/html/attachment.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site4/fst/var/www/html/attachment.php:59) in /home/virtual/site4/fst/var/www/html/attachment.php on line 68
Any thought as to getting the two hacks to integrate together? Or anyway to fix the problems im having?

Hoffi 09-22-2003 08:37 PM

Great. The Uninstall works perfectly.

PAINTBALLM 10-14-2003 04:10 AM

Database error in vBulletin Control Panel 2.3.2:

Invalid SQL: UPDATE attachment SET hash='3315f4bdf94d848b53a3ef8756408772' WHERE attachmentid='1'
mysql error: Unknown column 'hash' in 'field list'

mysql error number: 1054

Date: Tuesday 14th of October 2003 01:04:06 AM
Script: http://www.paintballmessage.com/foru...&total=&pergo=
Referer: http://www.paintballmessage.com/foru....php?s=&step=8


When I try to import my posts from the database, that is the database error im getting. It also says there has been a problem attaching the file when you try to make a new post within the forum. The path is set correctly, and I have tried uninstalling and it wont let me.

Please help me get this beast working ;)

PAINTBALLM 10-14-2003 04:38 AM

ok I figured that out, i had to execute the lines manually..

Now I have this problem..

Warning: fwrite(): supplied argument is not a valid File-Handle resource in /usr/local/psa/home/vhosts/paintballmessage.com/httpdocs/forums/admin/attachment_install.php on line 333

PAINTBALLM 10-14-2003 04:39 AM

Warning: SAFE MODE Restriction in effect. The script whose uid is 14426 is not allowed to access / owned by uid 0 in /usr/local/psa/home/vhosts/paintballmessage.com/httpdocs/forums/admin/functions.php on line 1949

Warning: stat failed for /attachments/b0e10845b2e4ad1d63087a7ab2f1cd6c.file (errno=2 - No such file or directory) in /usr/local/psa/home/vhosts/paintballmessage.com/httpdocs/forums/admin/functions.php on line 1953

And that when I try to make a new post

PAINTBALLM 10-14-2003 04:52 AM

Ok got it all fixed on my own ;) Im good, lol...

One more question, can I drop the file data or not, if so whats the query to do it? If I ever want to upgrade to a vb3 board, would it effect anything?

PAINTBALLM 10-14-2003 05:21 AM

grr ok one more that I cant figure out.. When you go to delete a thread that has attachments in it...

This is what it says..

Warning: unlink() failed (No such file or directory) in /usr/local/psa/home/vhosts/paintballmessage.com/httpdocs/forums/admin/functions.php on line 2001

I looked up line 2001 and it was this area:

// ###################### Start removeattachment #######################
function removeattachment ($attachmentid) {
global $DB_site,$attachpath;
$fileinfo = $DB_site->query_first("SELECT attachmentid, hash FROM attachment WHERE attachmentid='$attachmentid'");
$path = "$attachpath/$fileinfo[hash].file";
unlink($path);
}

It deletes the thread, its just returning that error, and its bugging me... Please help me

todd.o.callen 10-16-2003 04:11 PM

I have been running in 2.2.9 in production for months with this hack working perfectly. All of the sudden, this week, attachments stopped being accepted. We ran the repair.php routine to repair and optimize the tables, and this seemed to help temporarily, but the problem has recurred, and now the "fix" isn't working either.

Where do I start looking for clues as to the problem?
I have checked permissions on the forums, on the attachment directory, disk space, etc. No clues there. Since our company uses vBulletin for document control and we have an ISO9000 audit coming up next week, I am in a panic.

Please help?

todd.o.callen 10-16-2003 06:32 PM

Quote:

Originally Posted by todd.o.callen
I have been running in 2.2.9 in production for months with this hack working perfectly. All of the sudden, this week, attachments stopped being accepted. We ran the repair.php routine to repair and optimize the tables, and this seemed to help temporarily, but the problem has recurred, and now the "fix" isn't working either.

Where do I start looking for clues as to the problem?
I have checked permissions on the forums, on the attachment directory, disk space, etc. No clues there. Since our company uses vBulletin for document control and we have an ISO9000 audit coming up next week, I am in a panic.

Please help?

No error messages, no attachment queue issues, either.

Here's my.ini:
Quote:

[WinMySQLAdmin]
Server=C:/mysql/bin/mysqld-nt.exe

[mysqld]
datadir=E:/mysql/data
set-variable = max_connections=450
set-variable = key_buffer=16M
set-variable = myisam_sort_buffer_size=64M
set-variable = join_buffer=1M
set-variable = record_buffer=1M
set-variable = sort_buffer=2M
set-variable = table_cache=1024
set-variable = thread_cache_size=256
set-variable = wait_timeout=9600
set-variable = connect_timeout=10
set-variable = max_allowed_packet=16M
set-variable = max_connect_errors=10
and my phpinfo:

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???

EzX5U 01-30-2004 06:34 PM

hi
for anyone installed this hack..

can i choose where to enable or disable this feature in the forum?
can i allow mods or admin only to use it??

thx

waiting a reply..

gmarik 02-03-2004 04:17 PM

Completed readmore3o.gif
P,BODY{FONT-FAMILY:tahoma,arial,sans-serif;FONT-SIZE:11px;}ЛnI6Х ѕЩкЗ\0’јФ o5Й’yР*І67K„MЮеєюDХ€JПШ\"kЩЋ#bэX Аb§uёт¶jЊ6cд‚\0П№\0zЁ–ђЩ«}52о^ѕ[л°uъаУљпН \\1‘G Ѓ…Eѕ˜«Q<0ьЖUE$ЌH?ЃЗЌVФ*е–ОкЮЮ,2 ‰‡љщcЋ1ЋA^w YЦК:—Pњ\0Э·Їnв№ЩИ©qrЇµgВprCю|ац дgЦґґ;oнYк72”°\"dЇ иqФМЧ ¦Э<^\'ФE»4К»7–P%UAЏB;ьЗ5и^ qasz<Ґ“PєFгЄА§†\'УЊюuЮиццВy#+`бq *ЏјG_»ЗгQЯ°Чu…±™bC+7 @=NqЗЇ¦+‚ѕчѕ(0*Аёљ\"СКџГeAоyБoс ГLУPDосG0 т2КLvQи9ьjЮ±i|›I_*VЗ›pvь«ПМ{њzњbЇ 04v°YAhтЫГ’6rXу№ЬuЙ=ыtⶬ ¬ч`YК¬И6ѓњ(8зѓЫ¶~ѕВ¶E¤±±i/&»\"Џ›и§ЅgjђЪЭ\'–$x¤щЋн„Cй‘Лџ j†Т ХJE!ђH0Јnвюлн[єn“њBоb®дя\0«>џэjЅ4’^6Шu·Џeя\0бK %јoo%•ґG‘pог§ѕGOjЙіi4ЌNMр4¬˜уOьф ык=GlУх\0 ,ЇVЃСў\0Иу-іHя\0pњэ+°QQ|˜U=©ў4fmт[°ф©ћЛЋzУ„yк\0ТћфЭЗ|S”БcRЇJCАг* !ЙгЉiля\0Ц¬]\\AqvЈycm—u-ы±ЗVця\0=№џЯЖє|Т!–c:lC#lGbpoVдр:w¬ ќ КKдёb8DЫX0одгЫ?™З^›YЫ[ЃјLU Ъ dю}7uЦЬ«Иc@b&x\'їФ3Ћ§ҐTюСbb·Уb bИ‡xыПьRУу?Ті†—cэ¤чRµеМБ·9‰Э Іw>ЉфЖO~9С{[У™+M-шҐ;жaюЮЁ%†Нw—-лЁЬf»}±юлфЁоЇs,Чnc@H‚т!П№#$}j¤2I (/i\0%С— Јюєї¦iџЩгМуS1$олёп+ба NbЋ< Д„ћpЫЙъ»бп‘ZpЗе`ѕдCОжі{n}ЈтSE t),jP»¦bКsйњщWћx“Nљ;™|Щ6`с¶6ф=zя\0 Jуп€\"Hј5 ЁH ЌK|Щщ@9лЧµ7бЃ»—бKFо±°YP6ЬбWi9ЗL° эkњс ќЌЅее•іИіM$‡њп ЄзЋHRN<Ч¦шR%¶тнаUы6џo†$\0 аqнЖGвkjБ¤’ЮY^c|ґзЬЈђЂg©=qэkS[Љ-#Г2НЫЯ]#ZФ~хY‡ИЄ0@ Б9W?б] Бd€Z]›ќЫїЧЅыћћЭl0FFн3…vЪ¶гймѕ‚‹«{ ёH„‘Л˜3f>дрх5uјјEg§ -оe_љVбЏLџ§aя\0л*(¬¬?gљЪ\'1Џ™Х¶° сщfЈK‹’Y-.¤Мн˜bFЃ‡ TѕgЪЪ+і п Ўv%x?LгЦ·¬mн4ґЩlѕdд|ОЭ@ф?ЭФ‚ e”МќМxИпЃЪ¦ЋЮIЧК¶КЗРїLХп.8\" ;Џlх>юµ›®ЩґђҐм`µМ\'r/gФъдV=µтЩБђmXо…Iж6?z>„уЏN;Wgl ИіОб•ЗaRЫп(L„ёг*JЅHЙ>ґёд qP{P<\0љ^ЅM\0uдRvйXчЃ~ТЦv°\"®|Ы†Ы…9 ж=эOя\0®ёя\0]%ЫШAЂБ5Ш*зпМ%њ{d vвЈС3.љ7 f–w IЪ›Шn$ю8ЮЇ™¦xКЫБцh0f”;“Ь·Рw\0F*З f*эЇ.Р ІLv¤h9ЅШњухъQ:L±¤’Гq-М ђp¶йй‘Ђ^§ЧѓЃN–пSR–ђYµ№ЪJ$(]Ђч a~јU]’іМщё<ґqююR3Р‘Аъжњa*Пx*¤sВcПёa ЫеP\\ Hњ<–с‰Tь’^џ:OЄЖ>Uюtа/.Л-І€Зьј_°XЗыЄxэ Jљ{Л›!№ј\0к<€GСЫж#ЭEjiЪ\\a S,¤eЌєgџy_“шR8†ЮBsз$D¦yOХЏJОјЅ·v1 i$<љ_›Ї§OРЦ.*cЈњ

and there is stops

jjj0923 02-04-2004 03:39 PM

in the for what it's worth department... I have been using this hack for almost a year now and no problems whatsoever...

:)

ErryLee 02-22-2004 09:58 AM

:nervous:
Hello!

I hope someone can help me. At first: Sorry for my bad english, I´m a german user.

Version 2.3.4 (german)

I have installed the hack and everything is working fine. No error message at all.

>>>Import of Files from database completed

If you are sure that the files have been imported correctly you may drop the filedata column in the attachment table<<<

But in the folder is nothing importet. The attachment folder is empty and in the forum is no attachment left.

Thank you for help,
Soeren

Slybone 02-22-2004 12:30 PM

I hate to be the stupid one.... but this hack does what exactly?

ErryLee 02-22-2004 01:38 PM

Hi!

I did what the hack says to me:
At first I do the changes in the php files: attachment, editpost....

Then I make a folder "attachment" with stetting 777 and give the directory path in the admin control.

After that the hack imports the files in this folder.

But the folder is still empty.

Thanks
Soeren

ErryLee 02-25-2004 03:01 PM

No one can help me?? :disappointed:

TranceMaster 04-26-2004 06:41 AM

hi guys, got some problems here, im looking to uninstall this hack, but dont have a clue where to start.
but we really need it uninstalled, for now.

how do we go about doing so?

or how to do with it whilest upgrading to newest version

thanks in advance.

bitbender 04-26-2004 10:04 PM

Erry - You need to run the portion of the hack that copies the attachments across. If you have placed the remainder of the code properly, it will place any NEW ones posted as binary attachment files in there. If the folder is empty, then the copy from the Data Base wasn't done. This will also be painfully obvious, because any attachments will display only red x's too. If you are still seeing your attachments, well, something else is afoot. I'd review :)

Trance Master - As with any hack, you must reverse the changes to the code. How you get the attachments back into the data base is a seperate discussion. First, you will need to make sure your hosting allows for the increase in size of the DB, and then, you will need the attachment _upgrade.php mentioned earlier in this thread Here.

But that is only PART of the process. You will need to regress each part of the hack as it instructed you to apply it to all the php scripts, lest it will fail. Now, if I remember right, this was a very well documented one, so you can get a good visual of what needs to be replaced, becuse the hack tells you to look for this and replace it with that.

Good luck. I will be regressing mine when I go to vb3, as I have a ton of other hacked code thruought, and I am not changing any of mine, it's better to just go with it in the DB with vb3, and I have made it part of my conversion process :)

highlander_RD 05-23-2004 10:44 PM

I run vB 2.2.9 in my forum http://forum.egcommunity.it

This hack is *absolute necessary* as inserting the attachment files in a table field it's a madness. I actually hold in my forum about 15'000 image files that occupy ~400 MB. I followed the hack procedure as indicated in post #1 and I succeded to import tons of files in my new admin/attachment directory (chmod 777).

But... I got 2 problems:

1) when I read the attachment post (showthread.php), I cannot see anymore the preview image (I get the usual IE 6.0 broken image frame) whereas I can see, once clicked, the full size image in the popup page (so the attachment link works).
I tried to force a cache refresh by ctrl+F5 with no results.

2) I don't know if it depends on 3 previous attachments hacks:
-> the private attachments in PM hack (by Chen 'FireFly' Avinadav)
-> the admin CP browsing attachments hack (by Kevin https://vborg.vbsupport.ru/showthrea...threadid=23692)
-> the "who downloaded" hack (by Chris Bowyer)

I know that it's maybe too late to get a help, but any suggestions are welcome.

Thanks,

Kamui Shirou 04-16-2005 12:04 AM

Hey,
nice hack, but somehow my hash for the files disappeared. now it only shows a red cross. how can i get them back. the files are still in the attachment folder, it's only the hash query in the database.

Marco van Herwaarden 04-16-2005 06:35 AM

I hope you are aware of the fact that this is a hack for vB2?

jjj0923 08-26-2005 02:13 PM

I've been using this hack for over two years now and just ran into my first problem... the datatype for the index field "attachmentid" is tinyint - length 5 and my forum members have posted 65,535 images to date and now they cannot add any more...

I'm reluctant to go in and change the data type to medint or integer and expand the length of the field without consulting with someone first. Has anyone else run into this problem and if so - how did you get around it.

upgrading to V3 is just not in the card for me until the end of september because of a very busy schedule..

any help would be appreciate - especially if you are using this hack on V2 and have oversome this problem yourself..

thanks in advance...

- jeff

Marco van Herwaarden 08-26-2005 03:31 PM

I don't know the code, but it is very unlikely that the code will fail if you change the datatype to a longer integer type.

But you better check if there are not other tables that are refering to the same column, they would have to be changed also.

jjj0923 08-26-2005 10:35 PM

well - the length is 5 character does a medint or integer fields require more characters?

Marco van Herwaarden 08-27-2005 07:46 AM

Are you talking about usable 'characters' (positions) or internal storage in the database?

Yes it will increase, that is why it will be able to hold a higher value. And like i said, modifying all columns in the database that reference this column should probably be enough.

Azeem 09-15-2005 01:41 AM

Hi so which directory do I upload this to? (Newb here) and wil this solve my problem of not being able to upload large files (on shared hosting cant change max upload size)

Zachery 09-15-2005 06:07 AM

You know this mod is for vBulletin 2 and is a default feature for vB3 ;)

bitbender 11-27-2005 05:26 PM

Quote:

Originally Posted by Zachery
You know this mod is for vBulletin 2 and is a default feature for vB3 ;)

Yep, completely.

But, until we can get it to work consistiently when merging the data back to the DB before running the VB 3.5.* upgrade script, it's still a bone of contention. Even at the VB 3.5 (gold) level, it does not seem to recognize the fact that the attachments are in files versus data base, even if you enable it. That's a problem (unless I am doing it wrong, and I'd LOVE it if someone showed me a better way here).

That implies to me that anyone using the Attachments As Files hack HAS to get the attachments loaded back into the filedata variable before we can proceed with the move to 3.5. When I try to upgrade to vb 3.5 without merging the attachment data back into the DB, the upgrade script fails when it goes to alter the attachments table on or about step 10/42. So, for my hacked up situation, I have to perform the process.

I am having a problem now with losing about 2 thousand of the latest attachments. I rewrote attachment_upgrade.php to to;
a) Check the return codes on each of the DB and File calls being made
b) count of how many attachment records are in the returned array
c) Write a message every 500 attachments saying "nnnn have uploaded sucessfully"
c) count of how many failed upload
d) write out some basic messaging of these actions - total in array, total uploaded, total failed..

While the script runs, it matches the count of records I see in my live DB, and I get no "file not found" messages. Also, it appears that the attachment table is back to being the huge behemoth it once was when the filedata variable contained the attachment data(800+ Meg).

One cannot remove the hash field from the attachment table prior to running the attachment_upgrade.php script as it depends on that field to help determine the file name to read into the filedata variable. Although I have tried to remove this after I did run the attachment_upgrade script to see if that made a difference.. It didn't. As a matter of fact, it caused a loss of rows.

The problem is that when I take this DB into VB 3.5 it seems to lose all attachments posted after a certain date (like 1/5/2005 thru current day). Anything older than that is ok, as well as any new ones updated.

I have tried a ton of variations to see what in creation is happening. I cannot proceed with losing 2 thousand+ attachments.. Any Ideas, or insights?

Zachery 11-27-2005 06:21 PM

Quote:

Originally Posted by bitbender
Yep, completely.

But, until we can get it to work consistiently when merging the data back to the DB before running the VB 3.5.* upgrade script, it's still a bone of contention. Even at the VB 3.5 (gold) level, it does not seem to recognize the fact that the attachments are in files versus data base, even if you enable it. That's a problem (unless I am doing it wrong, and I'd LOVE it if someone showed me a better way here).

That implies to me that anyone using the Attachments As Files hack HAS to get the attachments loaded back into the filedata variable before we can proceed with the move to 3.5. When I try to upgrade to vb 3.5 without merging the attachment data back into the DB, the upgrade script fails when it goes to alter the attachments table on or about step 10/42. So, for my hacked up situation, I have to perform the process.

I am having a problem now with losing about 2 thousand of the latest attachments. I rewrote attachment_upgrade.php to to;
a) Check the return codes on each of the DB and File calls being made
b) count of how many attachment records are in the returned array
c) Write a message every 500 attachments saying "nnnn have uploaded sucessfully"
c) count of how many failed upload
d) write out some basic messaging of these actions - total in array, total uploaded, total failed..

While the script runs, it matches the count of records I see in my live DB, and I get no "file not found" messages. Also, it appears that the attachment table is back to being the huge behemoth it once was when the filedata variable contained the attachment data(800+ Meg).

One cannot remove the hash field from the attachment table prior to running the attachment_upgrade.php script as it depends on that field to help determine the file name to read into the filedata variable. Although I have tried to remove this after I did run the attachment_upgrade script to see if that made a difference.. It didn't. As a matter of fact, it caused a loss of rows.

The problem is that when I take this DB into VB 3.5 it seems to lose all attachments posted after a certain date (like 1/5/2005 thru current day). Anything older than that is ok, as well as any new ones updated.

I have tried a ton of variations to see what in creation is happening. I cannot proceed with losing 2 thousand+ attachments.. Any Ideas, or insights?

You are moving from 2.x with this hack to 3.5?


All times are GMT. The time now is 01:56 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.02214 seconds
  • Memory Usage 1,899KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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