- Go to check_login_status.php file to replace $dyn_www = '/forum/'; with this http://www.gtkforum.com/ on live server. ----
- Check the following php.ini directives on live server for availabilities and settings: ------
- display_errors this directive controls whether PHP errors should be sent to the screen. In a production environment this should always be turned off.
- error_reporting this directive controls which errors that should be reported. You should set this to E_ALL and you should fix all issues that appear by doing this.
- log_errors this controls whether errors should be logged to a file. I would recommend that you always turn this on.
- error_log this is the path of the file errors should be written to. This is only applies if log_errors is turned on obviously.
- Note: To run gtkforum.com/myphpinfo.php to see configuration settings.
- Enable this line //error_reporting(0); scripts/check_login_status.php file on live server for security reason -----
- Go to agoTimeFormat.php file and uncomment this line /*date_default_timezone_set('Africa/Lagos');*/ on live server or GO TO PHP.ini file to look for date.timezone then change the value e.g. date.timezone='Africa/Lagos' save the file and restart the server. -----
- Try activation.php script with //error_reporting(E_ALL); and //ini_set('display_errors', '1'); enabled on live server to see how the errors will be displayed. Moreover try to delete a registered account without activation from the database then go to the email inbox & click the link again to activate in order to see the error message that will display. -----
- Enable this //parse_url($_SERVER['HTTP_REFERER']); and //$host = $ref["host"]; in parse_post.php file to check the working of HTTP_REFERER for light level security. -----
- Test forgot password and change email functionalities on live server.
- Submit gtkforum.com to many search engines, visit their sites for rules in submiting your site. See google.com, bing.com etc. ---------
- Change the share buttons function URLs like http://localhost to http://gtkforum.com in view_thread.php file from around line 948 down. Input twitter hash tag username in place of the hashtags and create acccount or page for each media button. -----
- Test run why Pinterest sharing button is not working when uploaded to live server. -----
- Confirm that this file include_once("scripts/check_login_status.php"); is put at the top of every page in order to disable error reporting or you add error reporting to individually to the page e.g. error_reporting(0); -----
- Enable htaccess on local server by going to Apache icon and selecting httpd.conf, look for "LoadModule rewrite_module modules/mod_rewrite.so" remove the # comment save and restart the server. ------
- Check out google and yahoo webmaster tools to carry out some settings like robot not crawling admin pages etc. -----
- After test running everything, the Create or Manage Ads button should be disable temporarily in template_header.php line 106 and also disable ads on pages like index.php line 275 of //require_once("display_home_ad_top.php") & require_once("display_home_ad_bottom.php") line 289, (search.php //require_once("display_search_ad_top.php") line 142 & //require_once("display_search_ad_bottom.php") line 151), (view_thread.php //require("display_sec_ad_top.php") line 1318 & //require("display_sec_ad_bottom.php") line 1440) (section.php //require("display_sec_ad_top.php") line 277 & //require("display_sec_ad_bottom.php") line 292) and any other pages if there is any. (remember to enable these lines later) -----
- Create admin@gtkforum.com email for admin ----
- Don't forget to enable birthdays display on the home page. See lines 302 to 310
- Create auto_responder@gtkforum.com or noreply@gtkforum.com for auto responder mails. -----
- Create script for changing email address using ajax or php, see modals.php page to begin maybe from line 135 down.
- Delete other users/members from their profile pages after logging in leaving a member with username Godwin then create new members to test run the application. ------
- Upload as it is from the local server then test run almost every thing before deleting data from the database such as forum posts, member ads etc. -------
- Create every minute cron job and link to cron_jobs/every_minute.php ------
- Look at Digital Marketing once again to discover more/important features for more promotions of www.gtkforum.com
- // error supplying null to mysqli on display_section_ad.php on line 41 has been fixed with this code below on these pages view_thread.php, section.php and also enabled null for ad_display_section column of gtk_ads table. Note: These changes are done both on local and remote sites.
$sectionTitleNow = $row["section_title"];
if($sectionTitleNow != "")
{
$sectionTitleNow = $sectionTitleNow;
}
else
{
$sectionTitleNow = "Default";
}
This is done on this day 10/12/2018 - 06:16 AM
-
// error supplying null to mysqli in section_display.php on line 3, 5 and 5 and in template_header.php on line 276 are to be fixed but this is solution testing phase by disabling //mysqli_free_result($sql); on line 15 and also specifying column names e.g. id, title and section_url on forum_sections table instead of using * (select all) to see whether it is the cause of the errors. This is done on this day 10/12/2018 - 06:16 AM.
Update has been done bcos of that same errors still displaying that is enabling null value for title column of forum_sections table on 12/12/2018.
-
Apart from Too many connections with error code: (HY000/1040) and User 'db_username' already has more than 'max_user_connections' active connections with error code: (HY000/1203). Items 23 and 24 above have been marked for solution on 10/12/2018 to check result after few hours or days.
-
Update made on display_home_ad.php line 43 be replacing Home Page with $homeAdSection variable and on index.php few if statements have been added like
// avoid sending null to gtk_ads table
if($homeAdSection != "")
{
$homeAdSection = $homeAdSection;
}
else
{
$homeAdSection = "Default";
}
-
Default value of 'Default' has been added to ad_display_section column of gtk_ads table. Done on 18/12/2018 - 04:24 AM
-
Update has been made for display_search_ad.php to avoid PHP Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/path1/path2/display_search_ad.php on line 43 by first creating this variable $searchAdSection = "Search Page"; on line 20 of search.php. Then use the variable $searchAdSection with the assigned value of "Search Page" in the if statement as given below around line 127 of search.php.
// avoid sending null to gtk_ads table
if($searchAdSection != "")
{
$searchAdSection = $searchAdSection;
}
else
{
$searchAdSection = "Default";
}
Updated on 19/12/2018 - 012:57 PM
-
On 2/1/2019 record inserted into gtk_ads table with Default value for ad_display_section column to see whether this error will stop: PHP Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /p1/p2/p3../section_display.php on line 3
-
11/01/2019 I added // Google Adsense Code on the following pages adSpaceRight.php, index.php pg-223 and section.php pg-303
This page view_thread.php will have ad that is unique since Google ad does not allow two or more add codes that are different to be added to a page, it should be one same ad code on a single page.
This page section.php pg-303 has if($i == 2 || $i == 8) for staggering Googel ad but when there are more than 10 or more posts on each of the sections then it will be modified to something like if($i == 6 || $i == 17)
- Updates done on 18/01/2019 to stop accidental deletion of other members' images/posts are:
- posts_display_status field added to forum_posts table after posts_display column with length 1 & default value 0
- this script AND posts_display_status='1' has been added to mysqli_query of variable $sqlDelDisable in cron_jobs/every_minute.php file.
- the second mysqli_query of variable $sqlDelDisableOriginalId in this file cron_jobs/every_minute.php has been replaced with this: "SELECT * FROM forum_posts WHERE id='$del_post_id' AND posts_display='disable' AND posts_display_status='1' OR otid='$del_original_post_id' AND posts_display='disable' AND posts_display_status='1' OR post_author='$del_post_author' AND posts_display='disable' AND posts_display_status='1'" examine carefully and make neccessary changes.
- for this post variable else if(isset($_POST['disable_id'])) in this file gtkadmin/members.php, after the first two mysqli_query these two queries have been added with a comment: // update posts_display_status to 1 for the member whose posts display has just been disabled
mysqli_query($db_conx, "UPDATE forum_posts SET posts_display_status='0' WHERE posts_display='disable'") or trigger_error('Query failed: '. mysqli_error($db_conx));
mysqli_query($db_conx, "UPDATE forum_posts SET posts_display_status='1' WHERE posts_display='disable' AND post_author_id='$disable_id'") or trigger_error('Query failed: '. mysqli_error($db_conx));
- after this comment ///// Begin updating enable or disable post display on a table in the file parse_post.php, within the if statement add this mysqli_query: mysqli_query($db_conx, "UPDATE forum_posts SET posts_display_status='1' WHERE posts_display='disable' AND id='$this_id' AND post_author_id='$log_id' AND post_author='$log_username' LIMIT 1") or trigger_error('Query failed: '. mysqli_error($db_conx)); has been added to delete any pending posts that display was disabled:
-
The above updates that is num. 31 have been confirmed and tested to be working as expected.
- Changes made to display_search_ad.php to stop errors (18/03/2019)
- include("scripts/connect_to_mysql.php");
- $dyn_www = $_SERVER['HTTP_HOST'];
- $dyn_www = 'http://www.gtkforum.com/';
- The above URL should be edited to match any URL
- The first three lines above have been added to pages such as display_search_ad.php, display_section_ad.php and display_home_ad.php respectively
- Search for Adsense in case you want enable back, they are commented out bcos Google didn't show them again & without reasons on the these pages: (6/04/2019)
- index.php
- adSpaceRight.php
- adSpaceRightHome.php
- section.php
- view_thread.php
- search.php