Security Related

Guy Mizrahi about Security and Technology.
Subscribe

Archive for the ‘Tips and Tricks’

how to regenerate phpbb_topics

August 20, 2008 By: Guy Mizrahi Category: Tips and Tricks 1 Comment →

if phpbb_topics table is corrupted and you need to regenerate it, you can use this script:

<?php
//———————-//
// phpbb_topics    Bappear    //
//———————-//
include “config.php”;
$abc = mysql_connect($dbhost, $dbuser, $dbpasswd);
mysql_select_db($dbname);

$aaa = mysql_query(“SELECT ” . $table_prefix . “posts.topic_id, ” . $table_prefix . “posts.forum_id, ” . $table_prefix . “posts.poster_id, ” . $table_prefix . “posts.post_time, not ISNULL(” . $table_prefix . “vote_desc.topic_id) as vote_topic_id, (count(” . $table_prefix . “posts.post_id) – 1) as topic_replies, IF(ISNULL(” . $table_prefix . “posts_text.post_subject), ‘Generic Title’, ” . $table_prefix . “posts_text.post_subject) as post_subject, ” . $table_prefix . “posts_text.post_id as topic_first_post_id, max(” . $table_prefix . “posts_text.post_id) as topic_last_post_id FROM `” . $table_prefix . “posts` LEFT JOIN ” . $table_prefix . “vote_desc ON ” . $table_prefix . “posts.topic_id = ” . $table_prefix . “vote_desc.topic_id LEFT JOIN ” . $table_prefix . “posts_text ON ” . $table_prefix . “posts.post_id = ” . $table_prefix . “posts_text.post_id GROUP BY ” . $table_prefix . “posts.topic_id;”, $abc);

while($data = mysql_fetch_array($aaa)) {

mysql_query(“INSERT INTO `” . $table_prefix . “topics` (`topic_id`, `forum_id`, `topic_title`, `topic_poster`, `topic_time`, `topic_views`, `topic_replies`, `topic_status`, `topic_vote`, `topic_type`, `topic_first_post_id`, `topic_last_post_id`, `topic_moved_id`) VALUES(” . $data[‘topic_id’] . “, ” . $data[‘forum_id’] . “, ‘” . mysql_real_escape_string($data[‘post_subject’]) . “‘, ” . $data[‘poster_id’] . “, ” . $data[‘post_time’] . “, 0, ” . $data[‘topic_replies’] . “, 0, ” . $data[‘vote_topic_id’] . “, 0, ” . $data[‘topic_first_post_id’] . “, ” . $data[‘topic_last_post_id’] . “, 0);”);
}

mysql_free_result($aaa);
mysql_close($abc);
?>

this script was created by one of my forums member, Nachum.

Thanks – It was a real save.

Internet Explorer 8

March 06, 2008 By: Guy Mizrahi Category: Tips and Tricks No Comments →

So.. Want to download Internet Explorer 8?

You have the guts to surf with Microsoft Beta 1 product?

Good for you (some people I know will tell you to begin the line with: I am not so sure it’s)

you can get it here:

Download Internet Explorer 8 Beta 1


Bad Behavior has blocked 40 access attempts in the last 7 days.

FireStats icon Powered by FireStats