Navigation
Last Seen Users
fox00:32:48
GrafKakashi00:52:03
zottelxxl00:58:44
ow4nd01:10:38
hczz01:19:45
mcatlin2801:54:41
Branti02:04:13
hqrpele02:13:07
jimmy091202:15:30
gabi4a02:36:34

Members: 27,566
Newest: borrya
Downloads v7
Downloads v6
One-click Translation
Translate This Site

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

6.xx.xx
6.xx.xx
4% [19 Votes]

7.00.xx
7.00.xx
8% [38 Votes]

7.01.xx
7.01.xx
8% [40 Votes]

7.02.xx
7.02.xx
80% [400 Votes]

Votes: 497
You must login to vote.
Started: 26/03/2012 11:58

Polls Archive
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Connect via Facebook
Connect via Facebook
Our Coders
Shoutbox
You must login to post a message.

18-05-2013 10:01
Can I link a panel to another subdomain? If so how? openside() echo ??? "http://xxxxx/infus
ions/panel/panel.p
hp" closeside()

18-05-2013 01:20

18-05-2013 01:19

18-05-2013 01:18

18-05-2013 00:49

18-05-2013 00:48

18-05-2013 00:21

16-05-2013 22:09
monclermoncler

16-05-2013 22:08
bottes uggbottes ugg Cheers!

16-05-2013 22:07
<a href="http://www.bo
ttesuggpaschersold
e.com/">ugg pas cher</a>ugg pas cher Cheers!

Shoutbox Archive
In memoriam

Nick Jones
1973-2011

Sponsors
Articles Hierarchy
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;
}
?>
5359
Stic on July 11 2009 13:28:47

Why need to change tables prefix ? to run multiple php-fusions on site ?

966
snowneo on August 23 2009 08:32:13

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.