Here is the relevant file that I suspect contributes to the never ending "waiting for localhost" in my local machine:
<?php
// This is the main configuration file. To get this script running
// and customize it to your needs, you will have to change some
// parameters here. Every parameter is explained with a comment,
// and you must ONLY change the values between the two " in every line!
//
// The first part are the parameters you definitely have to change to
// get things running so you can at least use the 'install.php' script
// -------------------- REQUIRED PARAMETERS --------------------
// Your MySQL server/host :
$conf['dbhost'] = "localhost";
// IMPORTANT: If you don't know what MySQL is or wether you have a
// MySQL server or not, then you have a problem - contact you server
// administrator.
// MySQL database name :
$conf['dbname'] = "hijrah";
// MySQL database username :
$conf['dbuser'] = "root";
// MySQL database password :
$conf['dbpass'] = "akarkata";
// Your website default language :
$conf['deflang'] = "en";
// Buy unit list :
$conf['unit_list'] = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100);
$conf['doc_root'] = $_SERVER["DOCUMENT_ROOT"]."/hijrah.biz/"; //this code, I think create the proble cuz this is the only one that I make changes. If not change, it create a blank page
//$conf['doc_root'] = getenv("DOCUMENT_ROOT"); this is the previous code that makes the page blank at localhost and getting fatal error at remote host
//$conf['doc_root'] = $_SERVER["DOCUMENT_ROOT"]; //if installed at root of a domain
// Complete path to the templates directory (with trailing slash) :
$conf['tpldir'] = $conf['doc_root']."/theme/";
// Complete path to the languages directory (with trailing slash) :
$conf['langdir'] = $conf['doc_root']."/includes/lang/";
// Complete path to the files directory (with trailing slash) :
$conf['files_directory'] = $conf['doc_root']."/files/";
// -------------------- END OF CONFIGURATION --------------------
?>
This is the index file:
<?php
require_once("config_inc.php");
require_once("includes/globals_inc.php");
require_once("includes/sponsor_inc.php");
display_home_page("page_home.html");
?>
This is the global_inc.php file:
<?php
$now = gmdate("'d-m-Y H:i:s'");
$timenow = time();
session_start();
define('_VALID_MOS_', 1 );
require_once($conf['doc_root']."/includes/"."class.fasttemplate.php");
require_once($conf['doc_root']."/includes/"."class.phpmailer.php");
require_once($conf['doc_root']."/includes/"."func_inc.php");
require_once($conf['doc_root']."/includes/"."lang_inc.php");
require_once($conf['doc_root']."/includes/"."auth_inc.php");
require_once($conf['doc_root']."/includes/"."online_users_inc.php");
// require_once($conf['doc_root']."/license_inc.php");
db_connect();
if (!session_is_registered('config_loaded')) {
$conf_row = db_result("SELECT matrix_width,matrix_deep,autospill,autowithdraw,program_name,
program_url,egold_name,expdays,confirm_mail,date_format,min_withdraw,pay_activation,
sender_name,sender_mail,egold,bank,egold_amount,bank_amount,spend_memo,ref_bonus,
is_smtp,smtp_host,smtp_user,smtp_pass,withdraw_fee,autoreentry,inc_mlm,inc_hyip FROM setting");
$_SESSION['conf_matrix_width'] = $conf_row['matrix_width'];
$_SESSION['conf_matrix_deep'] = $conf_row['matrix_deep'];
$_SESSION['conf_auto_spill'] = $conf_row['autospill'];
$_SESSION['conf_auto_withdraw'] = $conf_row['autowithdraw'] ;
$_SESSION['conf_auto_reentry'] = $conf_row['autoreentry'] ;
$_SESSION['conf_min_withdraw'] = $conf_row['min_withdraw'];
$_SESSION['conf_program_name'] = $conf_row['program_name'];
$_SESSION['conf_program_url'] = $conf_row['program_url'];
$_SESSION['conf_admin_bank'] = $conf_row['bank'];
$_SESSION['conf_admin_egold'] = $conf_row['egold'];
$_SESSION['conf_egold_amount'] = $conf_row['egold_amount'];
$_SESSION['conf_egold_name'] = $conf_row['egold_name'];
$_SESSION['conf_bank_amount'] = $conf_row['bank_amount'];
$_SESSION['conf_sender_name'] = $conf_row['sender_name'];
$_SESSION['conf_sender_mail'] = $conf_row['sender_mail'];
$_SESSION['conf_confirm_mail'] = $conf_row['confirm_mail'];
$_SESSION['conf_expdays'] = $conf_row['expdays'];
$_SESSION['conf_date_format'] = $conf_row['date_format'];
$_SESSION['conf_is_smtp'] = $conf_row['is_smtp'];
$_SESSION['conf_smtp_host'] = $conf_row['smtp_host'];
$_SESSION['conf_smtp_user'] = $conf_row['smtp_user'];
$_SESSION['conf_smtp_pass'] = $conf_row['smtp_pass'];
$_SESSION['conf_withdraw_fee'] = $conf_row['withdraw_fee'];
$_SESSION['spend_memo'] = $conf_row['spend_memo'];
$_SESSION['conf_inc_mlm'] = $conf_row['inc_mlm'];
$_SESSION['conf_inc_hyip'] = $conf_row['inc_hyip'];
$_SESSION['conf_ref_bonus'] = $conf_row['ref_bonus'];
$_SESSION['conf_pay_activation'] = $conf_row['pay_activation'];
$hconf_row = db_result("SELECT * FROM setting_investment");
$_SESSION['conf_unit_cost'] = $hconf_row['unit_cost'];
$_SESSION['conf_pay_rate'] = $hconf_row['pay_rate'];
$_SESSION['conf_pay_length'] = $hconf_row['pay_length'];
$_SESSION['conf_pay_times'] = $hconf_row['pay_times'];
$_SESSION['conf_referral_rate'] = $hconf_row['referral_rate'];
$_SESSION['config_loaded'] = 1;
$_SESSION['lic_userid'] = $lic_userid;
}
?>
This is the sponsor_inc.php file:
<?php
defined('_VALID_MOS_' ) or die('Restricted Access' );
if ($_SERVER['QUERY_STRING']) {
if ($_GET['id'] != '') $id_sponsor = $_GET['id'];
elseif ($_GET['ref'] != '') $id_sponsor = $_GET['ref'];
}
if (eregi("^[_\.0-9a-z-]+$", $id_sponsor)) {
$id_sponsor = read_loginid($id_sponsor);
$id_sponsor = read_userid($id_sponsor);
}
if ($id_sponsor and is_numeric($id_sponsor)) {
if (read_aktif($id_sponsor)) {
if ($id_sponsor != $_SESSION['sponsor_userid']) {
$row = db_result("SELECT * FROM members WHERE userid='$id_sponsor'" );
$_SESSION['sponsor_userid'] = $row['userid'];
$_SESSION['sponsor_name'] = $row['name'];
$_SESSION['sponsor_email'] = $row['email'];
$_SESSION['sponsor_phone'] = $row['phone'];
$_SESSION['sponsor_city'] = $row['city'];
$_SESSION['sponsor_address'] = $row['address'];
$_SESSION['sponsor_state'] = $row['state'];
$_SESSION['sponsor_yahoo'] = $row['yahoo'];
$_SESSION['sponsor_country'] = $row['country'];
$_SESSION['sponsor_lang'] = $row['lang'];
}
$sponsor = $id_sponsor;
} else {
$sponsor = make_sponsor();
$row = db_result("SELECT * FROM members WHERE userid='$sponsor'" );
$_SESSION['sponsor_userid'] = $row['userid'];
$_SESSION['sponsor_name'] = $row['name'];
$_SESSION['sponsor_email'] = $row['email'];
$_SESSION['sponsor_phone'] = $row['phone'];
$_SESSION['sponsor_city'] = $row['city'];
$_SESSION['sponsor_address'] = $row['address'];
$_SESSION['sponsor_state'] = $row['state'];
$_SESSION['sponsor_yahoo'] = $row['yahoo'];
$_SESSION['sponsor_country'] = $row['country'];
$_SESSION['sponsor_lang'] = $row['lang'];
$show_array = array(
'sponsor', $sponsor );
redirect("redirect.html", $show_array);
}
}
if (empty($_SESSION['sponsor_userid'])) {
$sponsor = make_sponsor();
$row = db_result("SELECT * FROM members WHERE userid='$sponsor'" );
$_SESSION['sponsor_userid'] = $row['userid'];
$_SESSION['sponsor_name'] = $row['name'];
$_SESSION['sponsor_email'] = $row['email'];
$_SESSION['sponsor_phone'] = $row['phone'];
$_SESSION['sponsor_city'] = $row['city'];
$_SESSION['sponsor_address'] = $row['address'];
$_SESSION['sponsor_state'] = $row['state'];
$_SESSION['sponsor_yahoo'] = $row['yahoo'];
$_SESSION['sponsor_country'] = $row['country'];
$_SESSION['sponsor_lang'] = $row['lang'];
}
$sponsor = $_SESSION['sponsor_userid'];
mysql_query("UPDATE members SET stats=stats+1 WHERE userid='$sponsor'");
mysql_query("UPDATE setting SET stats=stats+1");
$refer = getenv("HTTP_REFERER");
$addr = getenv('REMOTE_ADDR');
$url = $_SERVER['REQUEST_URI'];
mysql_query("INSERT INTO stats SET
userid ='$sponsor',
time = now(),
ip = '$addr',
url ='$url',
ref = '$refer',
lang = '{$_SESSION['lang']}'");
?>
Thanks in advanced.