 <p class="lead" align="left">Configuration Settings<p>Due to the complexity of the War Chest Builder, there are several separate configuration files. We'll discuss each one separately. The main configuration files are /wcb/config.php and /wcb/asgen/config.php which should already have been setup by the installation process. There are a few variables that may still need to be configured, if the information was not provided during the install.<p>It is important to note that these two (2) configuration files do have similar variables in them, but should not be copied to each other, otherwise the builder will not function. So when editing and uploading these, make sure you are overwriting the correct one.<p>FILE: /wcb/config.php<p>This is the primary configuration file and is shared by many scripts. Take a look at the contents below. We'll briefly cover each variable. If you do not know what a variable is or you are not familiar with php, do not worry, it is a very simple file to modify, as it is just plain text. <p>In php we store information in a variable. A variable is just a pointer to a memory location in the computer. The term variable means a value that can be changed at any time. Variables in php normally begin with a dollar symbol $ followed by a unique name, such as $var_name. To assign it a value we use an equals sign = then put the data to the right of it. Numbers do not need quotes, but text requires them. So we can assign a value to our example variable like this:
$var_name = "Text Value";<p>or<p>$var_name = 123;<p>Notice the ; (semi-colon) at the end of the line. These are required to signify the end of the line for php. In the War Chest Builder the configuration files are actually php classes. We will not get into details about classes, except to say the difference is how we create variables. In a class the variables start with the word var then the normal assignment, like this:<p>var $var_name = "Value";<p>This is the format used in the configuration files for the War Chest Builder. Here is the /wcb/config.php with dummy data:<p>http://warchestbuilder.com  # Last update: 23-SEP-2007  <br>
  ###########################################<br>
  $license_key="123-234-534-asd123-123";
<p>class AMCONFIG{  	var $dbuser="database_username";  	var $dbpass="database_password";  	var $dbhost="localhost";  	var $dbname="database_name";  	var $basedir="/home/username/public_html/wcb";  	var $batchdir="/home/username/public_html/wcb/batch_files";  	var $tempdir="/home/username/public_html/wcb/temp";  	var $baseurl="http://yourdomain.com/wcb";  	var $homeurl="http://yourdomain.com/wcb";  	var $mailprog="/usr/sbin/sendmail -t";  	var $admin_email="webmaster@yourdomain.com";  	var $filterdir="/home/username/public_html/wcb/keyword/filters";  	var $max_kwt=4;  	var $kwd_api_key="128wa2180sja0";  	var $max_keywords="300";</p>
<p> var $batch_log_file="/home/username/public_html/wcb/batch_logs/batchlog.txt";  	var $error_log_file="/home/username/public_html/wcb/batch_logs/errorlog.txt";  	var $failed_log_file="/home/username/public_html/wcb/batch_logs/failedlog.txt";  	var $max_log_size="2097152";</p>
<p> var $def_dpdDomain='info';  	var $def_NS="ns1.yourserver.com";  	var $def_Registrant="123456";  	var $def_Admin="123456";  	var $def_Billing="123456";  	var $def_Technical="123456";  	var $def_Customer="999999";  	var $def_Invoice="NoInvoice";</p>
<p> # Vars for whm (cpanel)  	var $def_cgiaccess="yes";  	var $def_frontpage="yes";  	var $def_shellaccess="no";  	var $def_maxftp="1";  	var $def_maxemail="unlimited";  	var $def_maxlists="2";  	var $def_maxsql="unlimited";  	var $def_maxsub="unlimited";  	var $def_quota="unlimited";  	var $def_bwlimit="unlimited";  	var $def_serverip="123.45.678.9";  	var $def_serveruser="root";  	var $def_serverpass="password";  	var $def_serviceusername="ResellerClub_username";  	var $def_servicepassword="ResellerClub_password";  	var $def_serviceparentid="ResellerClub_parent_id";  	var $def_servicerole='reseller';  	var $def_cookieperiod='86400';</p>
<p> # Report settings  	var $rows_per_page=25;</p>
<p> # Scheduler (future expansion)  	var $daily_ability=500;  	var $def_dailylimit=1000;  	var $def_weeklylimit=7000;  	var $def_monthlylimit=28000;</p>
<p>}  ?&gt;</p>
<p>All of the data in bold green is what needs to be set. The majority of these values will be set when the installer is run, providing you enter the data in the form. Many of these are self-explanatory for some people familiar with the system, cPanel and other aspects of web server administration. But, for those that are not familiar we will discuss each variable briefly. The variables in this single configuration file actually control many different subsystems in the builder and how sites are created and generated on hosting servers.<p>The following variables define the login information for the War Chest Builder database and the actual database name. The database must be created as an empty database before the installation is run. The $dbhost should be set to localhost, normally. There are rare cases where a separate database server is used. In that case you would enter the server name, or domain name for the MySQL server. An example could be: mysql.yourserver.com. Check with your hosting provider for details.
 
var $dbuser="database_username";
var $dbpass="database_password";
var $dbhost="localhost";
var $dbname="database_name";<p>If your MySQL server uses a non-standard port (other than port 3306) then the port will need to be specified at the end of the $dbhost name separated by a colon. Examples:
var $dbhost="localhost:1234";
var $dbhost="mysql.yourserver.com:1234";<p>Most standard RedHat Linux servers use port 3306 by default, and as such the port does not need to be specified. It is important to note that on servers containing cPanel for a control panel, the MySQL database names and usernames are different than a normal Linux server without a control panel. The same may be true with other control panels such as Plesk.<p>With cPanel database names start with the web site username followed by an underscore such as username_ then followed by the actual database username. As an example if the web site user is marketwiz and the database username is marketw then the cPanel database username becomes marketwiz_marketw and the same is true for the database name. If the database name is warchest then the cPanel database name would be marketwiz_warchest. But, cPanel also chops off names so the example may end up being marketwiz_warches. So when you create usernames and databases make sure you pay attention to whether or not cPanel has chopped it off.<p>It is important that the database details are correct before running the installer. Each software license has a limited number of installs allowed, usually 1. If you have to reload the installer due to a MySQL error, your installer may not run. Contact us if you have issues with that.<p>For the following physical directory paths you must use the full path, not a relative path.<p>$basedir should be set to the physical system path of the installation directory. Each server is different so your path be different than the 'norm' (as shown). You may have /home/username/www/wcb or /site1/www/username/wcb for example.
var $basedir="/home/username/public_html/wcb";<p>$batchdir should point to the /wcb/batch_files directory. This directory is used for storing files related to each batch process.
	var $batchdir="/home/username/public_html/wcb/batch_files";<p>$tempdir should point to the /wcb/temp directory. This directory is used for temporary files for many subsystems. Do not use this directory for other software.
	var $tempdir="/home/username/public_html/wcb/temp";<p>$baseurl and $homeurl should be the full http:// web address to the /wcb directory (including the http://). 
	var $baseurl="http://yourdomain.com/wcb";
	var $homeurl="http://yourdomain.com/wcb";<p>$mailprog should point to the path for your server's email send program. Most Linux servers use sendmail or qmail. For both, the default path should work. The --t is required for sendmail. If you're not sure what the path is, you can login to your server using SSH and type whereis sendmail  or locate sendmail.
	var $mailprog="/usr/sbin/sendmail -t";<p>$admin_email should be set to a valid email address. The current system does not actually send/receive any email. This is for future expansion.
	var $admin_email="webmaster@yourdomain.com";<p>$filterdir should be set the physical directory path of the /wcb/keyword/filter directory. You should not change this location. The files within that directory show up as checkboxes for the filter list in the builder.
	var $filterdir="/home/username/public_html/wcb/keyword/filters";<p>$max_kwt should be set to a fairly low value. This controls how many script threads can be run for the keyword harvester. The default of 4 is usually safe for most systems. If you experience heavy load situations you may wish to reduce this value to 1 or 2.
	var $max_kwt=4;<p>$kwd_api_key is the API key assigned to you by WordZe.
	var $kwd_api_key="128wa2180sja0";<p>$max_keywords is the maximum number of keyword phrases you wish to fetch from WordZe. The default of 300 is usually sufficient.
	var $max_keywords="300";<p>The following 3 logs are used to keep track of the builder operations in the event of any errors the logs provide a way of troubleshooting. You can change the names of the files. However, they should remain in the /wcb/batch_logs directory.
	var $batch_log_file="/home/username/public_html/wcb/batch_logs/batchlog.txt";
	var $error_log_file="/home/username/public_html/wcb/batch_logs/errorlog.txt";
	var $failed_log_file="/home/username/public_html/wcb/batch_logs/failedlog.txt";
	var $max_log_size="2097152"; // default= 2MB<p>The following variables setup the Reseller Club default account options. This data is provided by Reseller Club once you have an account with them. See the Getting Started section for details.
	var $def_dpdDomain='info';
	var $def_NS="ns1.yourserver.com";
	var $def_Registrant="123456";
	var $def_Admin="123456";
	var $def_Billing="123456";
	var $def_Technical="123456";
	var $def_Customer="999999";
	var $def_Invoice="NoInvoice";
	var $def_serviceusername="ResellerClub_username";
	var $def_servicepassword="ResellerClub_password";
	var $def_serviceparentid="ResellerClub_parent_id";
	var $def_servicerole='reseller';<p>The following variables setup default options for cPanel hosting server accounts. Refer to your cPanel documentation for complete details. These will be used when creating the web site accounts for the generated sites. Unless you will be interacting with each site manually, very little is required by the site. Mainly cgiaccess is required and quota should be unlimited, if possible. Many of the sites will be over 1 Gbyte in size with all of the articles, pages and images.
	# Vars for whm (cpanel)
	var $def_cgiaccess="yes";
	var $def_frontpage="yes";
	var $def_shellaccess="no";
	var $def_maxftp="1";
	var $def_maxemail="unlimited";
	var $def_maxlists="2";
	var $def_maxsql="unlimited";
	var $def_maxsub="unlimited";
	var $def_quota="unlimited";
	var $def_bwlimit="unlimited";
	var $def_serverip="123.45.678.9";
	var $def_serveruser="root";
	var $def_serverpass="password";<p>The Linux hosting server options are set in a separate configuration file discussed later.<p>The $def_cookieperiod is set to the number of seconds you wish to have them expire at. The cookies are mainly used by CURL sub-processes during harvesting and some of the promotion modules. The default is 86400 = 1 day.
	var $def_cookieperiod='86400';<p>$rows_per_page sets how many rows of data to display per page in the reports. Many of the reports have a drop-down list for Rows Per Page so you can override this value.
	# Report settings
	var $rows_per_page=25;<p>The following are reserved for future versions.
	# Scheduler (future expansion)
	var $daily_ability=500;
	var $def_dailylimit=1000;
	var $def_weeklylimit=7000;
	var $def_monthlylimit=28000;<p>

FILE: /wcb/asgen/config.php<p>For this configuration file, we'll only cover the items that are different than the main configuration. Some variables from the main configuration are duplicated purposely.<p>http://warchestbuilder.com  ###########################################  <br>
  $license_key="1239-qwd1u2-1239u";
<p>class ACONFIG{</p>
<p>var $batchdir="/home/username/public_html/wcb/asgen/batch";  var $dbuser="database_username";  var $dbpass="database_password";  var $dbhost="localhost";  var $dbname="database_name";  var $basedir="/home/username/public_html/wcb";  var $tempdir="/home/username/public_html/wcb/temp"; # temp dir  var $keyworddir="keywords"; #location of keyword.csv files  var $templatedir="/home/username/public_html/wcb/asgen/templates";  var $baseurl="http://yourdomain.com/wcb/asgen";  var $homeurl="http://yourdomain.com/wcb/asgen";  var $mailprog="/usr/sbin/sendmail -t";  var $admin_email="webmaster@yourdomain.com";  var $batch_log_file="/home/username/public_html/wcb/batch_logs/batchlog.txt";  var $error_log_file="/home/username/public_html/wcb/batch_logs/errorlog.txt";  var $failed_log_file="/home/username/public_html/wcb/batch_logs/failedlog.txt";  var $max_log_size="2097152";</p>
<p>var $def_chkFromList=1; # get filler words from db  var $def_numkw="110-280"; # default number of keywords/phrases -- range  var $def_template="default"; # default template directory  var $def_pageext="dirhtml";  var $def_fillerprefix="";  var $def_fillersuffix="";  var $def_filters="ckbnew_badwords"; // Ignore -- no longer used</p>
<p>}  ?&gt;</p>
<p>The $batchdir in this configuration file is used for the site uploader only. It should not point to the /wcb/batch_files directory.<p>The $def_chkFromList sets the default value for the 'Pull from database' checkbox. 0=unchecked 1=checked. This is only a default for when you load the profile editor form.<p>The $def_numkw is the default number or range for the number of keywords to use for building sites. This default is only for the profile form.<p>The $def_template sets the default template selected in the profile form. The default is 'default'.<p>The $def_pageext is the default page extension selected in the profile form.<p>The $def_fillersuffix and $def_fillerprefix set the default words for the edit boxes in the profile form. These can be left blank if you plan to pull them from the database for most profiles.<p>The $def_filters can be ignored. It is no longer used and is only included to prevent errors. It will be removed in the next update.<p>To add filters to the builder and article subsystems, edit the /wcb/linkslib/new_badwords.txt file. This file is used by all of the subsystems in War Chest Builder.<p>The remainder of the variables in this configuration file, are the same as the main configuration discussed above.<p>FILE: /wcb/api/constants.php<p>This file is for the Reseller Club domain registration API configuration. The only items you really need to set are the $SERVICE_USERNAME and $SERVICE_PASSWORD.  The defaults should be used for the rest.<p>The $LIB_DIR should not be changed.
<p> FILE: /wcb/accountcreator/sl-asu/asuconfig.php</p>
<p>This  configuration file is for the RedHat Linux hosting servers. This file  is uploaded to the /root area of each hosting server running Linux. The  majority of the values in it, are standard for Linux and normally will  not need to be modified at all.</p>
<p>http://warchestbuilder.com  #####################################################  # config file</p>
<p>class slasuconfig{  # named files  var $named_conf = "/etc/named.conf";  var $named_dir = "/var/named";  var $named_restart = "rndc reload";  var $hosts_file = "/etc/hosts";  var $forcedns_file = "/root/sl-asu/ns.conf"; # provided by package  var $firewall_xlat_file = "/root/fw-xlat.ip";</p>
<p># system user files  var $add_user = "useradd";								  var passwd_file = "/etc/passwd"; # used for getting user's home dir only  var $shell_file = "/etc/shells";  var $group_file = "/etc/group";  var $def_group = "shadow"; </p>
<p>var $force_home_dir = "1";	  var $inetd_restart = "/etc/rc.d/init.d/xinetd restart";   # linux 7+ (use inetd restart for &lt;7)  var $copy_skel = "-m";  var $virtuser_file = "/etc/mail/virtusertable";  var $localdomain_file = "/etc/mail/local-host-names";  var $use_mail_accts = "1";  var $sendmail_restart = "/etc/rc.d/init.d/sendmail restart";</p>
<p># apache files  var $httpd_conf = "/etc/httpd/conf/httpd.conf";  var $httpd_vhostdir = "/etc/asu_vhosts";  # will be created if doesn't exist  		# and included in httpd.conf  var $httpd_restart = "/etc/rc.d/init.d/httpd restart";  var $httpd_options = "Options ExecCGI FollowSymLinks Includes Indexes MultiViews SymLinksIfOwnerMatch";  var $httpd_userdir = "www"; # usually either public_html or www  var $httpd_cgi = "ScriptAlias /cgi-bin/ [HOME]/[USERDIR]/cgi-bin/";															  # MISC  var $error_log = "error.log";  var $temp_dir = "/tmp";</p>
<p>}  ?&gt;</p>
<p>We will not discuss too many of these as they really do not need to be changed. You can refer to the RedHat web site for more information about Linux configurations.<p>However, there are two (2) that may need to be changed if your server is not configured as standard.<p>$httpd_conf  is normally set to /etc/httpd/conf/httpd.conf by default when Apache is setup on the server. This is the location of the Apache configuration file. For normal Apache installations, there are two (2) possible locations for this file, the default /etc/httpd/conf/httpd.conf and /usr/local/apache/conf/httpd.conf for Apache 2 systems, typically. The other scripts that are uploaded automatically check both of the default locations, so changing this is only necessary if it is in a non-standard location.<p>
The $named_restart command may need to be changed if the DNS is not properly setup. The correct way to restart the DNS is using rndc reload. In some cases this command can fail, especially if the named process is not running.
 var $named_restart = "rndc reload";<p>To test this, login to the hosting server(s) using SSH (secure shell) as user root then type: rndc status  and press enter and see if it returns a status report. If it returns an error, then there is a problem with the DNS. You can try to start named manually by typing: /etc/rc.d/init.d/named start and press enter. Example:<p>[root@server ~]# rndc status
rndc: connect failed: connection refused
[root@server ~]#<p>[root@server ~]# /etc/rc.d/init.d/named start
Starting named:                                            [  OK  ]
[root@server ~]#<p>[root@server ~]# rndc status
number of zones: 4
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running
[root@server ~]#<p>As a last resort you can simply set:
 $named_restart = "killall --KILL named; /etc/rc.d/init.d/named start";<p>The last option is not recommended, though, as it is much slower. The rndc reload is the fastest way to reload the DNS domain names, and is highly recommended.
 <p>The other configuration files mainly deal with the promotional tools. Those will be covered in a separate section.
