FPHPFAQ Configure

From FreeBert Wiki

Jump to: navigation, search

[edit] Configuring The PHP/SQL FAQ Script to run on your server

Once you have uploaded all the PHP/SQL FAQ Script files to a directory on your web server, you are ready to configure the package to run on your server. To do so, you will need to edit the Local_Settings.php file in the faq script's root directory (if you uploaded your faq files to http://www.youdomain.com/PHPSQLFAQ/, the script root directory would be '/PHPSQLFAQ/'). In the Local_Settings.php file, you will see there are several settings that can be set, grouped into a couple of sections.

a) - Local Settings - The Local_Settings.php file stores info about your site required by the script and relate to the general setup of your faq script: $Site_Domain - this should be the full domain of the root of your site Example: 'http://www.freebert.com/' Tip: be sure to end your domain with a '/' $Site_Title - self explanatory $Site_Script_Root_Directory - the name of the directory the script files reside in. Example: if you uploaded the script files to http://www.youdomain.com/PHPSQLFAQ/, set Site_Script_Root_Directory = 'PHPSQLFAQ/' Tip: be sure to end your Site_Script_Root_Directory with a '/' $CSS_Filename - the name of the CSS file you want the script to use. Enter the title of the file only, and be sure that that file exists in the /css/ folder in your script directory. The package includes 2 default CSS files in the css directory, called WhiteBack.css and BlackBack.css. Try switching between these two to change the basic color scheme of your site. $Admin_Username="admin" - username used to login to secure admin section - we suggest changing from default 'admin' upon installation $Admin_Password="admin" - password used to login to secure admin section - we suggest changing from default 'admin' upon installation $FBFAQ_DB_S = "sqlc1.megasqlservers.com" - The server / IP address of your mysql server $FBFAQ_DB_U = "casinobunn862977" - The account username for your mysql server $FBFAQ_DB_P = "opendoors" - The account password for your mysql server $FBFAQ_DB_DB = "L10stats_casinobunny_com" - The name of the database in your mysql server $FBFAQ_DB_Prefix = "FBFAQ_" - a prefix for use on the tables created by the script - leave as is after you have created your database tables

b) - Installing Database Tables - Once you have uploaded the package files to your server, and have added your specific info to the Local_Settings.php file (including your SQL Database info), you are ready to create the required tables in your SQL database. You have two methods to do this: run our table creation page, or manually create the tables in your database. i - To install the tables to your database using our premade script, run the InstallTables.php file located in the root directory of your uploaded package files. You must have already configured your database connection info in the Local Settings file for the installation script to work. ii - To install the tables to your database manually, either copy and paste or manually setup the SQL tables using the info below:

  • note:

(in the examples below, replace ".$Table_Prefix." - including the "" quotes - with the value you have set in your Local Settings file for database prefix.)

CREATE TABLE `".$Table_Prefix."Answers` (

 `Answer_ID` int(10) unsigned NOT NULL auto_increment,
 `Question_ID` int(5) unsigned default NULL,
 `Answer_Text` text,
 PRIMARY KEY  (`Answer_ID`),
 UNIQUE KEY `Answer_ID` (`Answer_ID`),
 KEY `Answer_ID_2` (`Answer_ID`)
 )
 

CREATE TABLE `".$Table_Prefix."Questions` (

 `Question_ID` int(5) unsigned NOT NULL auto_increment,
 `Question_Title` varchar(255) default NULL,
 `Question_Priority` int(10) unsigned default NULL,
 PRIMARY KEY  (`Question_ID`),
 UNIQUE KEY `Question_ID` (`Question_ID`),
 KEY `Question_ID_2` (`Question_ID`)
 )
Personal tools
Toolbox