May 17 2012 11:49:17
Navigation
Last Seen Users
J_K_NIELSEN00:25:52
volt12300:54:06
darans00:54:23
Acert01:28:15
michi01:51:45
LukeWarm01:55:47
Dave9202:33:51
KasteR02:37:41
colber02:55:19
rubberdark04:02:20

Members: 25,040
Newest: Dave92
Downloads v7
Currently popular Downloads

FusionBoard 4 6351
Video Gallery 4524
Video Infusion 4019
Photoalbum Mass U... 3499
Professional Down... 3403
Avatar Studio 3338
XHTML mod for mod... 3186
Button panel 2703
60 Animated smileys 2610
VArcade 2.1 2532

Latest Downloads


Code Snippets v1.10 8
Video Infusion Pro 84
Who Is Where 16
Facebook Login/Register 62
Yolks Smiley Pack 56
SWTOR Recruiting Panel 25
NeoBlog Theme 28
Code Snippets 9
FAQ Panel 15
Download Plus Panel 32

Latest 100
Downloads v6
Currently popular Downloads

Banner System v2.0.4 2269
Video Gallery 1560
Extreme Theme Editor 1257
Fuzed Shoutbox 1066
Seoname.php 1016
Icon Package 2.0 879
Extended Profile ... 782
News.php 699
Tabbed welcome panel 646
EXTboard 583

Latest Downloads


Banner System v2.0.4 2269
Last comments 102
Language switcher panel 319
Admin Submission Panel 130
Admin private messag... 253
Google Sitemap Fast 144
ExtBoard 1.2 430
EXTboard 583
v6.01.18 - v6.01.19 74
v6.01.19 FULL 240

Latest 100
Latest Articles
Patch Re-captcha PHP...
A tour through the n...
Protect your Fusion ...
Change your database...
Admin Control Panel ...
How to Secure Your I...
Show Content by Defa...
v7 | Add social book...
v7 | Custom MySQL er...
How To: A PM after r...
v7 | SEO friendly UR...
v7 | SEO friendly UR...
Comments Advanced Vi...
Auto-redirect to the...
A tour through PHP-F...

View all articles
Change your database prefix.
The following file will allow you to alter the table prefix used in your site.
Once this script has run you do need to alter the config.php to reflect the change.

Upload the file to your fusion site base directory
Go To it
Fill the form
Submit
Assume no Error - Open config.php
Assume no Error - Alter prefix to suit new prefix.
Assume no Error - remove this file from server. File written by Ausimods
<?php
/**
* @name prefix_changer.php
* @access ALL
* @author AusiMods @ < ausimods.com >
* @copyright GPL
* @package php-fusion
* @subpackage External table prefix changer
*/
switch (isset($_POST['op']) && $_POST['op'] == 'go' ? $_POST['op'] : NULL) {
case 'go':
$new_prefix = isset($_POST['prefix']) ? $_POST['prefix'] : "fusion_";
if(file_exists('config.php')) {
require_once "config.php";
}
else {
die('Incorrect file location');
}
if (!mysql_connect($db_host, $db_user, $db_pass)) {
die('Could not connect to mysql');
}
$sql = "SHOW TABLES FROM $db_name";
$result = mysql_query($sql);
if (!$result){
echo "Cant Find the tables<br />\n";
print(mysql_error());
exit;
}
while ($row = mysql_fetch_row($result)){
$rename = ereg_replace(DB_PREFIX, $new_prefix, $row[0]);
$change = @mysql_query("RENAME TABLE `{$db_name}`.`{$row[0]}` TO `{$db_name}`.`{$rename}` ;");
if($change) {
echo "SUCCESS ON: {$row[0]} to {$rename}<br />\n";
}
else{
echo "FAILURE ON: {$row[0]} to {$rename}<br />\n";
}
}
mysql_free_result($result);
echo 'Pretty sure the task is complete.<br /> Open config.php and alter the current prefix to your
new one to re enable your site.';
break;
default:
echo '<form method="post" action="">';
echo '<input type="hidden" name="op" id="op" value="go" />';
echo 'Change table prefix to <input type="text" name="prefix" id="prefix" value="" />.';
echo '<input type="submit" name="submit" id="submit" value="submit" />';
echo '</form>';
break;
}
?>
Comments
#1Stic on July 11 2009 08:28:47
Stic
Why need to change tables prefix ? to run multiple php-fusions on site ?
#2snowneo on August 23 2009 03:32:13
snowneo
The main purpose is for security purposes. This way hackers dont know the database prefix and it makes it a little more difficult.
Post Comment
Please Login to Post a Comment.
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Our Coders
Netrix
Smokeman
Elyn @ MrRusty
Diemux
Donate
Shoutbox
You must login to post a message.

17/05/2012 00:59
spam cleaned up

16/05/2012 05:55
I deleted forum posts but I don't have user banning or shoutbox editing permission or I would take care of those too...

15/05/2012 02:33
andredrake , Silvie Spam!! Confused perde

03/05/2012 22:00
El-nino.ugu.pl <---- Fanpage Fernando Torres PL / ENG

03/05/2012 21:34
Hi, everybody, it's been a while, since I was here...

01/05/2012 06:13
Bye!hi

28/04/2012 08:35
tomeck there is one in the downloads here check it out

23/04/2012 07:03
This is the theme of the site joga the theme of perde perde

22/04/2012 16:12
Hello, i need facebook login for fusion 7.01.5 can you help me ? Thumb Up!

21/04/2012 11:05
How i can disable the right click option in all pages over the site?

Member Poll
Which version of PHP-Fusion are you using?









You must login to vote.
Advertiser
One-click Translation
Translate This Site

Online Stats
Guests online: 7
Members online:
no members online


registered members: 25040
newest member: Dave92

user today: 3672
user online: 7
Max. onlinerecord: 86
Max. per day: 32490
user yesterday: 4992
user month: 137501
Entire users: 3839384

last 24h:
























In memoriam

Nick Jones
1973-2011
Render time: 2.68 seconds - 84 Queries 17,998,739 unique visits