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)
-   -   Optimized attachments in vB2.X.X (https://vborg.vbsupport.ru/showthread.php?t=49306)

Boofo 02-25-2003 01:19 PM

Quote:

Originally posted by pogo
The chances that you want to upload a file that has the same hash like a file that is already in the database are 1:340.000.000.000.000.000.000.000.000.000.000.000. 000

That means you have to upload this many files before the "bug" will occur. Theoretically.

Damn! I'm getting close. I better watch this. ;)

By the way, how would you enter that equation on a calculator?

Xenon 02-25-2003 01:31 PM

*gg*
my calculator can handle exponental operations, so i can just type in 3.4 exp 38 :)
ok, it's not a MS calculator, but one i bought for scholl long time ago :)

Boofo 02-25-2003 01:40 PM

Guess I'm going to have to get me one of those. Who knows when I'll run into this again? What do you think the equation would be on that one? LOL

Martin64 02-25-2003 11:47 PM

What are the odds for it happening two times in a row for the same user? ;)

Just kidding. :)
Smart hack btw.

Smoothie 02-26-2003 02:12 AM

Is this needed, or does it help if allow duplicate images is set to "yes"?

Brad 02-26-2003 02:18 AM

I cant run this query via phpmyadmin, im getting a no SQL query error.

[sql]ALTER TABLE attachment ADD hash VARCHAR(32) DEFAULT '0' NOT NULL;[/sql]

Brad 02-26-2003 02:22 AM

Something is buggy in my cpanel, i got them to run.

lifesourcerec 02-26-2003 11:26 AM

I noticed, before adding this hack, I had this line:

PHP Code:

unlink($attachment); 

But in the hack it has:

PHP Code:

@unlink($attachment); 

So, does the @ suppose to be there?

pogo 02-26-2003 01:46 PM

Yes. It is this way in the actual vBulletin.

Quote:

PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.

TranceMaster 02-26-2003 03:34 PM

how would i go about removing this hack
after installing it, my forum has been going very very slow :(
how do i remove these queries?
-------------------------------------------------------------------------------
ALTER TABLE attachment ADD hash VARCHAR(32) DEFAULT '0' NOT NULL;
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
UPDATE attachment SET hash = md5(filedata);
-------------------------------------------------------------------------------


-------------------------------------------------------------------------------
ALTER TABLE attachment ADD INDEX(hash);
-------------------------------------------------------------------------------

hope sum1 can help
thanks


All times are GMT. The time now is 07:05 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.01232 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_php_printable
  • (2)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
  • (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