WSN Links
Featuresspacer Showcasespacer Reviewsspacer Demosspacer Purchasespacer Manualspacer Support
Config.php
Config.php
By Paul

Config.php contains the information needed to access your database. Thus, it needs to be retained when upgrading (which is why the file distributed is config.php.txt to prevent overwriting).

If you lose your config.php for some reason, you can fill it in manually. Get the .zip/.tar.bz2 file for your version number, extract it, and look at the config.php file within it. It'll be something like this:
<?php
$categoriestable = 'wsnlinks_categories';
$linkstable = 'wsnlinks_links';
$metatable = 'wsnlinks_settings';
$commentstable = 'wsnlinks_comments';
$memberstable = 'wsnlinks_members';
$membergroupstable = 'wsnlinks_membergroups';
$sessionstable = 'wsnlinks_sessions';
$emailtable = 'wsnlinks_email';
$ratingstable = 'wsnlinks_ratings';
$switchestable = 'wsnlinks_switches';
$pmtable = 'wsnlinks_pm';
$markuptable = 'wsnlinks_markup';
$imtable = 'wsnlinks_im';
$modtable = 'wsnlinks_modlog';
$attachmentstable = 'wsnlinks_attachments';
$helpcatstable = 'wsnlinks_helpcategory';
$helpitemstable = 'wsnlinks_helpitem';
$cronstable = 'wsnlinks_crons';
$caltable = 'wsnlinks_calendar';
$traderstable = 'wsnlinks_trader';
$searchestable = 'wsnlinks_searches';
$invitestable = 'wsnlinks_invites';
$dbtype = 'mysql';
require_once 'databases/mysql.php';
$dbuser = 'root';
$dbpass = '';
$dbhost = 'localhost';
$databasename = 'wsnlinks4';
$adb = new db($dbhost, $dbuser, $dbpass, $databasename);
if ($adb->dbh) $connection = $adb->dbh;
$prefix = 'wsnlinks_';

$dirurl = 'http://localhost/wsnlinks';
$uploadpath = '/var/www/wsnlinks/attachments/';
$rejectspiderlevel = '';
$rejectguestlevel = '';
?>


Set the $dbuser and $dbpass to your mysql username and password, and $databasename to the name of your mysql database. Also type your directory url and upload file path. If you used a different prefix than wsnlinks_ you will have to change every instance of wsnlinks_ to your prefix.

You will need to edit this file when you move your site to a different server. Your old database info will not work on the new server, and so you must edit your config.php to update it to the info of the new database before your WSN Links install will function again.

Rating: 22222
2/5 based on 4 votes. The median rating is 2.

Rate this article:

Submitted: 10/22/03 (Edited 12/22/06)

Description: What to do if you overwrite it by accident, or if you're switching servers.

Views: 1648 views. Averaging 1 per day.
In the most recent 30 day period, there've been 2 views.

Previous Article | Next Article

Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support