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)

Chris M 09-08-2002 03:15 PM

Did you make sure that you converted the existing attachments?

Satan

Bison 09-08-2002 03:53 PM

I ran the converter and dumped everything into a directory I created. The original files are there .... only when I upload a image to be viewed inside the thread that this doesn't work! :(

FleaBag 09-09-2002 11:39 AM

Working on 2.2.7, cheers! :D

NoAhBoDy 09-10-2002 06:00 PM

Very nice hack...makes backup sooo much faster :)

Thanks!

Learner29 09-12-2002 02:20 AM

well,

I apologize if my question has been answered before, but here it is.

I installed this hack, and did all the changes, and the forum replied back saying :

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

now, I went to the forum to see if "the files have been imported correctly" and all attachments are still downloadable..

I got a look at the attachments folder that I made on the root level and to which I gave the 777 chmod, and I found plenty of BINARY files with totally bizarre names such as 0b9732abf17c4032c2ef27fd562f4f70.file

1) does that mean the hack worked perfect for me now ???

2) when you say "you may drop the filedata column in the attachment table", does that mean in phpmyadmin???

3) would future attachments be automatically exported as files, or do I have to do anything every now and then???

4) if a user attaches a virus-containing zip file, can I simply delete it via FTP ? if not, how can I safely delete an attachment now??

thank you so much PPN for the great hack, I really appreciate your great help

Learner29 09-16-2002 09:59 PM

no answer ??? :confused:

Learner29 09-17-2002 07:45 AM

would any kind person kindly help a bit ???

Hoffi 09-17-2002 03:05 PM

Quote:

Originally posted by Learner29
well,
[snip]
1) does that mean the hack worked perfect for me now ???
yes
2) when you say "you may drop the filedata column in the attachment table", does that mean in phpmyadmin???
yes, i tried it before i dropped it, with renaming and testing if the Attachments work.
3) would future attachments be automatically exported as files, or do I have to do anything every now and then???
new Att. are saved as a file. Without the filedata they can't stored in the table.
4) if a user attaches a virus-containing zip file, can I simply delete it via FTP ? if not, how can I safely delete an attachment now??
i think it is very complicated to find out which file in the folder is the one you want to delete. Do it as always...

thank you so much PPN for the great hack, I really appreciate your great help


Learner29 09-17-2002 04:37 PM

thank you a million Hoffi

I really really appreciate your help

thank you man !!!!

Quote:

Quote:

3) would future attachments be automatically exported as files, or do I have to do anything every now and then???
new Att. are saved as a file. Without the filedata they can't stored in the table.
well, thank you a lot, but as I was not sure, after exporting the attachments to files, I did not delete the table immediately... and was waiting to be sure.

Now that I trust your answer, I could go and delete the table in phpmyadmin.

but what about the attachments that were made between the export I did a few days ago and dropping the table today?? would those be lost ???

should I delete all the attachments folder and restart the exportation and then immediately delete the table in phpmyadmin???

so you are saying in this way, as the table is missing in the database, all future attachments would be exported directly as files , right ??



Thank you a million for your help

I appreciate it man .

Hoffi 09-17-2002 07:02 PM

Immedeatly when you uploaded your hacked files, the attachments weren't stored in the DB.

Learner29 09-17-2002 09:52 PM

thank you very much for your great answer

Bison 09-18-2002 12:41 AM

All I know is that this frigging hack has hosed up my whole company forum!

I have it installed and I dropped the filedata table as requested and now the admin/index.php file and serverinfo.php files are looking for that table!

Sheeze!

I don't see anywhere in the installer that mentions to comment out the calls from these files to that specific table!

BTW, i'm using vb2.2.6 ... Is there anyway to reverse the damage that this ******* hack has done? I did do a backup (vbulletin.sql) from a recent dump ... will that get my sh*t back into my database?

My frigging Boss is going to kill me! :(

Learner29 09-18-2002 12:54 AM

Quote:

Rolodex wrote:

All I know is that this friggin hack has hosed up my whole forum!

I have it installed and I dropped the filedata table as requested abd now
the admin/index.php file and serverinfo.php files are looking for that
table!

Sheeze!

I don't see anywhere in the installer that mentions to comment out the calls
from these files to that specific table!

BTW, i'm using vb2.2.6 ... Is there anyway to reverse the damage that this
******* hack has done? I did do a backup (vbulletin.sql) from a recent dump
... will that get my sh*t back into my database?

My friggin Boss is going to kill me! :(

Oh my God. I have not dropped the table yet, for though I do trust Hoffin, I
just wanted to make a little test.
I uploaded a file, call it file.zip, and then checked my root vbattachments
folder and my database using phpmyadmin, and the file was updated to both !!
the file appeared both in my database AND in my vbattachments folder .....

I deleted the post and the file.zip, and the file was deleted in BOTH my
vbattachments folder AND my database....

is that normal ???

Hoffi 09-18-2002 11:25 AM

First of all nobody should delete a whole table. The filedata is only a column in the Attachment Table. If you delete the whole Table the Forum won't work anymore...
If you apllied all Changes to your Files, the access to that row is eliminatzed and the Files are used.

However, if you make changes to your Forum make Backups. Even the Database and the Files!

@Rolodex: If the Dump was before you drop the Column (Table?) it brings you the Data back. But if you won't use this great Hack, you must change your Files back to original too.

Bison 09-18-2002 05:25 PM

Did I say "Drop Table?"

Ok ... I did but I actually didn't drop the table ...
just the filedata column. I had everything installed proplerly (I think) but there were things that weren't showing up (Like Uploaded Images In threads) and all of the attachments that were uploaded after the hack couldn't be seen at all ... and i'm the Admin.

This is the only hack that didn't work for me. PPN I like your hacks but this one and the "login as user" Hack (Scews up the User.php after installing PHP 4.2.x) has compiled a few problems with me and with the Vbulletin 2.2.x Board Code.

I think you should check them again for compatibility...

Regards,
Rolodex

Learner29 10-01-2002 01:48 AM

I am sorry to hear that Rolodex......

really.

I have just dropped the filedata column in phpmyadmin and everything seems to work .....

I could download old attachments, upload new ones, and download new ones. as admin or just a modo......

Learner29 10-01-2002 01:49 AM

thank you PPN once again for this great hack.

my database is about 20 megabites less now .........

oufffff

Scott MacVicar 10-01-2002 12:47 PM

I'll post the importer sometime before the vB3 release which will translate your attachment table into a vB3 readable format.

But the easiest solution may just be to import all the attachments back into the database.

Learner29 10-01-2002 01:19 PM

thank you PPN for your continued efforts .....

to be honest with you, I DID think of this yesterday and asked myself : what when vb3 comes out ??? how do I keep those exported attachments that are not any more part of the database now...

thank you for working on an importer to prepare the attachments in a vb3 readable format.

I appreciate it.

one more thing : as soon as your hack is ready for vb3, I will be happy to test it for you and tell you how it works.

Scott MacVicar 10-01-2002 07:06 PM

Attachments as files is standard in vB3 so I'll simply attach a script to change it to that format, I'll have it pretty well tested anyway well before any sort of public release. But you probably should test it just to make sure that I dont have any problems with different OS's.

WhisperPntr 10-05-2002 01:58 PM

Rolodex...you really should have tested this on a home server first.

BTW I really like this idea. I will try it sometime this week.

Essamz 10-08-2002 12:28 PM

hi

im having this error with the hack:

Warning: Supplied argument is not a valid File-Handle resource in /home/httpd/vhosts/montada.com/httpdocs/xx/attachment_install.php on line 403

Imported ffx_box.jpg

Warning: Supplied argument is not a valid File-Handle resource in /home/httpd/vhosts/montada.com/httpdocs/xx/attachment_install.php on line 403

Imported lee 2.jpg

Warning: Supplied argument is not a valid File-Handle resource in /home/httpd/vhosts/montada.com/httpdocs/xx/attachment_install.php on line 403

Imported conan_1_800.jpg

Brad 10-11-2002 08:18 AM

PPN, im having a problem with this under 2.2.8 (clean install). i get this error when trying to reply:

Parse error: parse error in /home/kousetsu/public_html/kan/admin/functions.php on line 2561

Fatal error: Call to undefined function: makelogincode() in /home/kousetsu/public_html/kan/global.php on line 360

line 2561 is the last ?>.

Scott MacVicar 10-11-2002 08:20 AM

your missing a }

I'm at university just now so can you pm me your functions.php so I can look at it.

Brad 10-13-2002 02:47 AM

Yea, i found that out, however i have a new error.

when i upgraded to 2.2.8 (clean install) and tried to re install this i droped the hash table via the installer, new attachments work but old ones throw this error due to the hash table begin droped.

Quote:

Warning: stat failed for /home/kousetsu/public_html/attachments/.file (errno=2 - No such file or directory) in /home/kousetsu/public_html/kan/attachment.php on line 59

Warning: Unable to access /home/kousetsu/public_html/attachments/.file in /home/kousetsu/public_html/kan/attachment.php on line 60

Warning: fopen("/home/kousetsu/public_html/attachments/.file", "rb") - No such file or directory in /home/kousetsu/public_html/kan/attachment.php on line 60

Warning: fread(): supplied argument is not a valid File-Handle resource in /home/kousetsu/public_html/kan/attachment.php on line 61

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/kousetsu/public_html/kan/attachment.php on line 62

Warning: Cannot add header information - headers already sent by (output started at /home/kousetsu/public_html/kan/attachment.php:59) in /home/kousetsu/public_html/kan/attachment.php on line 63

Warning: Cannot add header information - headers already sent by (output started at /home/kousetsu/public_html/kan/attachment.php:59) in /home/kousetsu/public_html/kan/attachment.php on line 64

Warning: Cannot add header information - headers already sent by (output started at /home/kousetsu/public_html/kan/attachment.php:59) in /home/kousetsu/public_html/kan/attachment.php on line 65

Warning: Cannot add header information - headers already sent by (output started at /home/kousetsu/public_html/kan/attachment.php:59) in /home/kousetsu/public_html/kan/attachment.php on line 66

Warning: Cannot add header information - headers already sent by (output started at /home/kousetsu/public_html/kan/attachment.php:59) in /home/kousetsu/public_html/kan/attachment.php on line 67

Warning: Cannot add header information - headers already sent by (output started at /home/kousetsu/public_html/kan/attachment.php:59) in /home/kousetsu/public_html/kan/attachment.php on line 73
Is there anyway to give old attachments a new hash in the DB so they work?

Ninth Dimension 10-13-2002 10:34 AM

I've just installed this hack again, and it works as well as it ever did, thank you fella :)

Brad 10-14-2002 07:53 AM

Just a bump.

Quote:

Originally posted by Anime-loo
Yea, i found that out, however i have a new error.

when i upgraded to 2.2.8 (clean install) and tried to re install this i droped the hash table via the installer, new attachments work but old ones throw this error due to the hash table begin droped.



Is there anyway to give old attachments a new hash in the DB so they work?


Brad 10-15-2002 06:54 AM

Bumping again.

Scott MacVicar 10-15-2002 07:35 AM

there isn't a way to associate the hash and the filename any more that was the whole point in using hashes, do you have a table backup before you dropped the column?

Brad 10-15-2002 08:25 AM

No. if i did i would have restored it, are you sure we couldent do something like import the files to the database and export them again?

sdenvers 10-20-2002 10:38 PM

Two problems encountered on 2.2.6 trying to install this hack:

1. It said I'd already installed it, but I haven't.
2. During import it gives this error for each file, and the attachments directory is left empty:

"Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/xxx.com/html/forums/admin/attachment_install.php on line 333

Imported car_wash.jpg"

Help!

FleaBag 10-28-2002 11:30 PM

Works with 2.2.8. :)

ricoche 10-29-2002 07:46 AM

Could anyone tell me what possibly could have gone wrong here? I saw in the previous post that this hack worked with 2.2.8. So I installed it and now all I get is a blank white screen on my computer. The hack has totally messed up my entire system and I don't know how to uninstall or fix this. I noticed a couple of people had this problem back a few posts but I didn't see a solution.

Any help would be appreciated all my hard work seems to have been destroyed.

Thanks,

Ricoche :disappointed:

Scott MacVicar 10-29-2002 08:02 AM

every page is a white screen?

It sounds like you've done something wrong within functions.hpp

ricoche 10-29-2002 08:20 AM

I agree I think there is a problem with my functions.php but I'm not sure how to correct it. I made a .bak of my original, so maybe if I delete the new one and go back to the install I can redo the cut and paste job?

Wow, this is pretty scary. I thought I had this down.

Oh, also I was able to back track and dump an attachment from the database into my attachments folder with permissions set to 777 just fine. Like I said I'm confined to my vbulletin control panel only ...at the moment.

Thanks for the reply. Right now <laugh> I'm just twiddling my thumbs and sweating bullets!!

:cross-eyed:

Ricoche

ricoche 10-29-2002 10:56 AM

Ok, I finally figured what I did wrong.

In the first edit for functions.php I failed to do the replace until the end of the function. I do understand some basic programming but for some reason I forgot that { } define beginning and ending of functions. Actually I knew this but if you look at the code it's quite confusing to identify where it ends. Kind of tricky I think.

Anyway all is well now except one thing that I think was posted earlier. The previous attachments that I had now no longer show up on the front page of my vbportal script. Have to figure that one out now.

Thanks.

ricoche 10-29-2002 11:12 AM

Finally got it. The conversion didn't work so I just deleted the only couple of attachments I had and reposted them. The script automatically did everything else and now my attachments can be viewed by admin at least.

Thanks for the script. It sure confused the heck out of me but in the end it does work.

Thank you .

Ricoche

HappyPike 10-30-2002 05:58 AM

How long does it take to import the files from the database to a directory? My forum's attachment table is 1.8 GB in size... I hope it doesn't take forever....

Also, does the script delete files from the attachments table as it imports the file, or does it only delete the files in the attachment table after all the files have been imported to a directory? If it makes a copy of all 1.8 GB files first, I don't think I have enough space on the server. :(

Thanks.

Areku 11-06-2002 10:30 AM

I'm sorry if I repeat questions but this support thread has grown too much...

- Are there any chances to have real file attach names instead of weirdos like 0170111c41158690b35dbd1754a54929.file?

- I'm running v2.2.0 and it seems to be working fine, but haven't tested it in full... Do i need to remove/add the visible thing u were talking about with 2.2.2?

- How do I reset the attachments table so I remove them from the DB now that I have them as files?

Thanks!

Scott MacVicar 11-06-2002 02:31 PM

I'll probably be changing it to just the attachmentid number soon it will allow for much easier vB3 upgrades. I'll actually try to do it tonight.


All times are GMT. The time now is 06:31 PM.

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.01720 seconds
  • Memory Usage 1,835KB
  • 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
  • (4)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