No matter what I keep getting this error. Is there something wrong with the code?
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/hosting/setup.conf:49) in /var/www/html/hosting/index.php on line 16
Warning: Cannot add header information - headers already sent by (output started at /var/www/html/hosting/setup.conf:49) in /var/www/html/hosting/index.php
Here is the index source:
<?
require("setup.conf");
define("DB_HOST", "$host");
define("DB_NAME", "$database");
define("DB_USER", "$user");
define("DB_PWD", "$pass");
require("functions.conf");
require("db_mysql.inc");
if (!isset($PHP_AUTH_USER)) {
header('WWW-Authenticate: Basic realm="Tier-3"');
header('HTTP/1.0 401 Unauthorized');
//echo 'Authorization Required.';
exit;
} else if (isset($PHP_AUTH_USER)) {
if (($PHP_AUTH_USER != "$ad_login") || ($PHP_AUTH_PW != "$ad_password")) {
header('WWW-Authenticate: Basic realm="Tier-3"');
header('HTTP/1.0 401 Unauthorized');
//echo 'Incorrect Password Entered.';
exit;
} else {
if (isset($action)) {
if ($action=="add_account") { $message = add_account($account_password,$account_email,$account_name,$account_company,$account_address,$account_city,$account_state,$account_zip,$account_country,$account_fax,$account_phone,$account_membership_id,$account_status, $account_pmt_type,$account_acct_no,$account_acct_exp,$account_check_no,$account_check_rt); }
if ($action=="client_update") { $message = update_account($account_password,$account_email,$account_name,$account_company,$account_address,$account_city,$account_state,$account_zip,$account_country,$account_fax,$account_phone,$account_membership_id,$account_status, $account_pmt_type,$account_acct_no,$account_acct_exp,$account_check_no,$account_check_rt,$account_id); }
if ($action=="client_delete") { $message = delete_account($account_id); }
if ($action=="add_membership") { $message = add_membership($membership_url,$membership_name,$membership_desc,$membership_price,$membership_recurring,$membership_frequency,$membership_approval,$membership_periods,$membership_active); }
if ($action=="update_membership") { $message = update_membership($membership_url,$membership_id,$membership_name,$membership_desc,$membership_price,$membership_recurring,$membership_frequency,$membership_approval,$membership_periods,$membership_active); }
if ($action=="membership_delete") { $message = membership_delete($membership_id); }
if ($action=="bill_all_now") { $message = bill_all_now(); }
}
if ($page=="") {
$page="orders";
}
include("template.html");
}
}
?>