Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2008, 12:10 PM
steveneff steveneff is offline
 
Join Date: Sep 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Messed up RSS2 external file

I have the DaniWeb style rewrite on my vbulletin and decided to add these to external.php. After making the edits it worked fine at first but the RSS2 feed had two sets off links (RSS1 is OK), one with the original urls and another with the new urls. I left this thinking It would correct itself once a few new post?s had been added.
After a while when I checked the feed it still had both sets of urls, hadn?t updated and reported an error at the top ?Internet Explorer was unable to update this feed and will try again later.? I uploaded the original file but this did not fix the error, so again put my edited version back up thinking it may sort itself.

In the early hours this morning I had a massive attack on my forums that I fended off with the htaccess ?deny from? and went to bed.

This morning I checked my RSS2 feed and it still has the error, I also got some email?s about database error?s (around the time of the attack) from the RSS

Quote:
Database error in vBulletin :

Invalid SQL:

SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield');

MySQL Error : Lost connection to MySQL server during query Error Number : 2013
Date : Friday, April 25th 2008 @ 05:03:05 AM
Script : /forums/external.php?type=RSS2
Referrer :
IP Address : 86.0.133.9
Username :
Classname : vB_Database
Quote:
Database error in vBulletin 3.6.9:

Invalid SQL:

SELECT *
FROM session
WHERE userid = 0
AND host = '66.249.70.146'
AND idhash = 'b7a7a78a0f0ab05079e72c6a96628b62'
LIMIT 1;

MySQL Error : Lost connection to MySQL server during query Error Number : 2013
Date : Friday, April 25th 2008 @ 05:03:20 AM
Script : /forums/calendar.php?do=add&c=1&day=2001-12-1
Referrer :
IP Address : 66.249.70.146
Username :
Classname : vB_Database
Are these error?s just part of the attack and I should ignore them or are they part of my messed up external.php mod?
Is it possible to flush the externall.php feeds from the database to have a fresh look at the output?
Is there anything obvious I may have done wrong changing the urls in external.php?

Thanks for your help.

--------------- Added [DATE]1209130790[/DATE] at [TIME]1209130790[/TIME] ---------------

Edits I made in external.php

Original
PHP Code:
case 'RSS':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]&goto=newpost", array(), falsetrue); 
Changed to
PHP Code:
case 'RSS':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array(), falsetrue); 

Original
PHP Code:
case 'RSS1':
                    
$xml->add_group('item', array('rdf:about' => $vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]"));
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]&goto=newpost", array(), falsetrue); 
Changed to
PHP Code:
case 'RSS1':
                    
$xml->add_group('item', array('rdf:about' => $vbulletin->options['bburl'] . "/thread$thread[threadid].html"));
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array(), falsetrue); 

Original
PHP Code:
case 'RSS2':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]&goto=newpost", array(), falsetrue); 
Changed to
PHP Code:
case 'RSS2':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array(), falsetrue); 

Original
PHP Code:
$xml->add_tag('category'unhtmlspecialchars($vbulletin->forumcache["$thread[forumid]"]['title_clean']), array('domain' => $vbulletin->options['bburl'] . "/forumdisplay.php?f=$thread[forumid]"));
                    
$xml->add_tag('dc:creator'unhtmlspecialchars($thread['postusername']));
                    
$xml->add_tag('guid'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]", array('isPermaLink' => 'true')); 
Changed to
PHP Code:
$xml->add_tag('category'unhtmlspecialchars($vbulletin->forumcache["$thread[forumid]"]['title_clean']), array('domain' => $vbulletin->options['bburl'] . "/forum$thread[forumid].html"));
                    
$xml->add_tag('dc:creator'unhtmlspecialchars($thread['postusername']));
                    
$xml->add_tag('guid'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array('isPermaLink' => 'true')); 
Reply With Quote
  #2  
Old 04-25-2008, 12:44 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The error indicates that in the middle of a query, the MySQL daemon cut the connection or shut down. It was probably part of the attack and it has probably restarted now.
Reply With Quote
  #3  
Old 04-25-2008, 01:02 PM
steveneff steveneff is offline
 
Join Date: Sep 2007
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Few, half way there, thanks dismounted, any idea's about the external.php RSS2 problem?

--------------- Added [DATE]1209136420[/DATE] at [TIME]1209136420[/TIME] ---------------

after uploading my updated external.php again this does now look to be working ok(maybe things got messed up as I was working on this when I got attacked).
It still has some duplicate post's because of the old urls but new post's are comming through on there own(new daniweb url only), so I guess the old urls will clear out in time. It would be nice if there was a way to clear them now.


*Warning*

If anyone else using the DaniWeb rewrite want's to make these edit's, you may want to replace the goto=newpost urls with the newpostinthread url, I didn't because I don't see the point in going to new post in thread, I just want the threads listed.

--------------- Added [DATE]1209136896[/DATE] at [TIME]1209136896[/TIME] ---------------

The old urls have now gone, they may have only been there because I was subcribed to the feed, after I unsubscribed they disapered.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:02 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.03390 seconds
  • Memory Usage 2,233KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete