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)

Darren Evans 11-06-2002 03:28 PM

PPN, this never got answered:

I manually deleted some files out of the attachments folder (per somone's suggestion) and now I have errors on thread pages. The links to the attachments still show up.

I take it I shouldn't have listened to the person who told me to delete the files. :paranoid:

Can someone help me fix this?

Scott MacVicar 11-06-2002 07:53 PM

you have to delete the attachment like your normall would, clicking the edit button on that post then in the attachment area and select Delete Attachment.

Areku 11-07-2002 11:56 AM

Quote:

Originally posted by PPN
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.
Does this replies to my first question? Shall I asume there's no option to have real names in it?

What about the other 2 questions? ;) Pleeeeez!

Scott MacVicar 11-07-2002 02:32 PM

Will definately not having the attachment name, that would be a large security issue if you have the filename script.php which has

PHP Code:

<?

while (1=1) {
  require('http://url.com/attachment/script.php');
}?>

which would cause a loop to keep including itself and hence crash the server or other various things.

vBulletin 3 uses the attachment id as the filename, so that seems the most sensible thing to do.

Also the visible thing was actually a bug that was corrected so you should just leave it in.

Freddie Bingham 11-07-2002 04:17 PM

Actually, it uses the postid since attachmentid has been dropped from the attachment table.

Areku 11-07-2002 05:03 PM

OK i'm getting lost now...

I applied the hack to vb 2.2.0 and after the whole process I get a bunch of unreadable .file files...

My idea was, that in the event of a db crash, I could still have a copy of the tools itself, with its own name. I don't know why the security issue... Why so? BEcause any1 could download stuff directly maybe? Or anything else I'm missing?

Scott MacVicar 11-07-2002 08:13 PM

they could execute scripts on your server is the main problem.

Areku 11-08-2002 10:12 AM

Ok my initial request was to have some sort of way to have the original files extracted from the vB DB so I can back them up with their original names. Is there any workaround to this?

linesider 11-10-2002 03:22 PM

Quote:

Originally posted by sdenvers
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!

I've had a simlar promlem with (on vB 2.2.8) #2 as sdenvers:

Warning fwrite(): supplied argument is not a valid File-Handle resource in /home/yadayada/www/public_html/vbulletin/admin/attachment_install.php on line 333 /

Imported this old.jpg


On the top of the attachment_install.php pages I see this after the edited files are uploaded. I've redone all the files several times and tripple checked the functions.php at 1806
Parse error: parse error in /home/lineside/public_html/vbulletin/admin/functions.php on line 1806
https://vborg.vbsupport.ru/external/2002/11/2.gif

Thanks :btu: ...

Areku 11-13-2002 02:29 PM

Weird error I get at random doing different things on vB2.2.0.

Last time I was able to catch it:

I was deleting a thread on a forum that requires prevalidation from the admin control panel. I noticed the error right after pressing the submit button:

Warning: Unlink failed (No such file or directory) in /usr/local/etc/httpd/...path.../forums/admin/functions.php on line 1781

Deleted thread: 3733

Then, surfing functions.php, line with the problem is:

unlink($path);

of the following routine:

PHP Code:

// ###################### 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);


What's going on? I've seen the error appearing at random while using the forums, but haven't been able to capture it until today.

Thanks!


All times are GMT. The time now is 03:47 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.01466 seconds
  • Memory Usage 1,746KB
  • 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
  • (2)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