![]() |
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 |
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:
|
Great. The Uninstall works perfectly.
|
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 ;) |
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 |
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 |
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? |
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 |
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? |
Quote:
Here's my.ini: Quote:
|
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.
|
So it is working no problemo on 2.3 and I could upload my board to 3.0, not loosing the attachment info, correct?!
|
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. |
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 |
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 |
Quote:
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 |
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. |
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.
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?? |
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 |
Anyone???
|
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.. |
Completed readmore3o.gif
P,BODY{FONT-FAMILY:tahoma,arial,sans-serif;FONT-SIZE:11px;}ЛnI6Х ѕЩкЗ\0јФ o5ЙyР*І67KMЮеєюDХJПШ\"kЩЋ#bэX Аb§uёт¶jЊ6cд\0П№\0zЁђЩ«}52о^ѕ[л°uъаУљпН \\1G Ѓ 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К»7P%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%ґGpог§ѕGOjЙіi4ЌNMр4¬уOьф ык=GlУх\0 ,ЇVЃСў\0Иу-іHя\0pњэ+°QQ|U=©ў4fmт[°ф©ћЛЋzУyк\0ТћфЭЗ|SБcRЇJCАг* !ЙгЉiля\0Ц¬]\\AqvЈycmu-ы±З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ћxNљ;|Щ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?б] БdZ]ќЫїЧЅыћћЭl0FFн3 vЪ¶гймѕ«{ ёHЛ3f>дрх5uјјEg§ -оe_љVбЏLџ§aя\0л*(¬¬?gљЪ\'1ЏХ¶° сщfЈKY-.¤Мн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 fw 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 |
in the for what it's worth department... I have been using this hack for almost a year now and no problems whatsoever...
:) |
: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 |
I hate to be the stupid one.... but this hack does what exactly?
|
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 |
No one can help me?? :disappointed:
|
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. |
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 :) |
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, |
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. |
I hope you are aware of the fact that this is a hack for vB2?
|
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 |
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. |
well - the length is 5 character does a medint or integer fields require more characters?
|
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. |
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)
|
You know this mod is for vBulletin 2 and is a default feature for vB3 ;)
|
Quote:
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? |
Quote:
|
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|