...

View Full Version : can someone fix my error?



ankifreeze
12-04-2010, 09:50 AM
hello,I need help on how to get rid of thes 3 error messages..thanks...:)
Warning: include() [function.include]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/header.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a2140946/public_html/headfoot.php on line 8

Warning: include(/usr/local/apache/htdocs/header.php) [function.include]: failed to open stream: Operation not permitted in /home/a2140946/public_html/headfoot.php on line

Warning: include() [function.include]: Failed opening '/usr/local/apache/htdocs/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a2140946/public_html/headfoot.php on line 8







here is content of headfoot.php

<?php
function get_main_content() {
$mncontent = mysql_result(mysql_query("select content from html where type='1page'"), 0);
echo($mncontent);
}
function uheader() {
global $m_header, $ref;
include($m_header);
}
function ufooter() {
global $m_footer, $ref;
include($m_footer);
}
function secheader() {
global $mem_header, $usrid;
include($mem_header);
}
function members_main_menu() {
global $title, $fontface, $server_clock, $usrid;
$s_vals = file_reader("/memlinks.html");
$s_vals = str_replace('[show_server_time]', $server_clock, $s_vals);
echo($s_vals);
}
function secfooter() {
global $mem_footer, $usrid;
include($mem_footer);
}
function file_reader($fileurl) {
global $_SERVER;
$fileurl = $_SERVER['DOCUMENT_ROOT'] . $fileurl;
$file=fopen($fileurl,'r') or die("File Doesn't Exist");
$contents=fread($file,filesize($fileurl));
fclose($file);
return $contents;
}
function checkPTCdata($dateis) {
$qres = mysql_query("UPDATE ptc_orders SET date_done='$dateis' WHERE clicks_remain=0 && date_done='0000-00-00'");
return;
}
function text() {
$res = mysql_query("select text from tads order by rand() limit 1");
if (mysql_num_rows($res) > 0) {
$text = mysql_result($res, 0);
echo("<p align=center>$text</p>");
}
}
function get_referral($vid) {
$query = "select ref_id from member_refs where mem_id=$vid";
if($res = mysql_query($query)) {
if($res1 = mysql_fetch_array($res)) {
return $res1[0];
}
}
}
function credit_ref_bonuses($par_id) {
for ($i=0; $i < count($par_id); $i++) {
$get_ref_data = mysql_query("SELECT acctype FROM user WHERE id=$par_id[$i] && status='Active'");
if (mysql_num_rows($get_ref_data) != 0) {
$refacc = mysql_result($get_ref_data, 0);
$get_bonuses = mysql_result(mysql_query("SELECT rbonuses FROM acctype WHERE id=$refacc"), 0);
$bonuses = explode(",", $get_bonuses);
$givebonus = $bonuses[$i];
if (!is_numeric($givebonus)) {$givebonus = 0; }
$upd_ref_acc = mysql_query("UPDATE user SET credits=credits+$givebonus, rbon_credits=rbon_credits+$givebonus, lifetime_credits=lifetime_credits+$givebonus WHERE id=$par_id[$i]");
$surpres = mysql_query("update adminprops set value=value-$givebonus where field='surplu'");
}
}
}
function get_ref_levels($mid,$z) {
global $tier;
$squery = "select count(*),mem_id from member_refs where ref_id in ($mid) group by mem_id";
if ($res = mysql_query($squery)) {
$tier[$z] = mysql_num_rows($res);
$res = mysql_fetch_array($res);
$mquery = "select mem_id from member_refs where ref_id in ($mid)";
if ($resultx = mysql_query($mquery)) {
$z = 1;
while ($rsvz = mysql_fetch_array($resultx)){
$rr_id[$z] = $rsvz[0];
$z++;
}
}
return $rr_id;
}
}
function credit_r_bonuses($par_id,$type,$ammt) {
$zzz = 0;
for ($i=0; $i < count($par_id); $i++) {
$zzz++;
$get_ref_data = mysql_query("SELECT acctype FROM user WHERE id=$par_id[$i] && status='Active'");
if (mysql_num_rows($get_ref_data) != 0) {
$refacc = mysql_result($get_ref_data, 0);
if ($type == 'credits') {
$get_bonuses = mysql_result(mysql_query("SELECT levels FROM acctype WHERE id=$refacc"), 0);
} else {
$get_bonuses = mysql_result(mysql_query("SELECT ptc_levels FROM acctype WHERE id=$refacc"), 0);
}
$bonuses = explode(",", $get_bonuses);
$givebonus = $bonuses[$i] / 100;
$givebonus = round($givebonus, 2);
$givebonus = $givebonus * $ammt;
if ($zzz == 1) {
$return_val = $givebonus;
}
if (!is_numeric($givebonus)) {$givebonus = 0; }
if ($type == 'credits') {
$upd_ref_acc = mysql_query("UPDATE user SET credits=credits+$givebonus, crdsfrmallrefs=crdsfrmallrefs+$givebonus, lifetime_credits=lifetime_credits+$givebonus WHERE id=$par_id[$i]");
$surpres = mysql_query("update adminprops set value=value-$givebonus where field='surplu'");
} else {
$update_ref_earnings = mysql_query("UPDATE user SET cshfrmallrefs=cshfrmallrefs+$givebonus, roi_cash=roi_cash+$givebonus, lifetime_cash=lifetime_cash+$givebonus WHERE id=$par_id[$i]");
$surpres = mysql_query("update adminprops set value=value-$givebonus where field='csurpl'");
$get_refstats = mysql_query("SELECT * FROM monthly_stats WHERE usrid=$par_id[$i] && yearis=" . date("Y") . " && monthis=" . date("m"));
if (mysql_num_rows($get_refstats) == 0) {
$ins_upd = mysql_query("INSERT INTO monthly_stats (usrid, refptc_cash, tot_owed, monthis, yearis) VALUES ($par_id[$i], $givebonus, $givebonus, " . date("m") . ", " . date("Y") . ")") or die (mysql_error());
} else {
$ins_upd = mysql_query("UPDATE monthly_stats SET refptc_cash=refptc_cash+$givebonus, tot_owed=tot_owed+$givebonus WHERE usrid=$par_id[$i] && yearis=" . date("Y") . " && monthis=" . date("m")) or die (mysql_error());
}
}
}
}
return $return_val;
}
function ref_shunt($memb_id) {
//$par_id=member_referral($memb_id);
$par_id=get_referral($memb_id);
$query="SELECT mem_id FROM member_refs WHERE ref_id=$memb_id";
$chv_id=Array();
$i=0;
if ($res=mysql_query($query)) {
while($id=mysql_fetch_array($res)) {
$chv_id[$i] = $id[0];
$i++;
}
$queryv="UPDATE member_refs SET ref_id=$par_id WHERE mem_id=";
for($i=0;$i<count($chv_id);$i++) {
mysql_query($queryv.$chv_id[$i]);
}
}
return 1;
}
?>

syncupsolutions
12-04-2010, 10:14 AM
An open_basedir error message concerns the locations of the file you are trying to include. This is a security measure set in your php.ini file to protect unauthorized access to files outside of your home directory.

You should:

A. Move the file closer within the scope of your script so it can be included without error.

B. Turn off the open_basedir in your PHP.ini via the cPanel or WHM (Bad idea...)

C. Extend your permissions to allocate that certain directory to your username.

If this is a shared hosting account, then I would contact customer support for assistance in the error. The rest of the errors will go away once that one does.

ankifreeze
12-04-2010, 12:09 PM
An open_basedir error message concerns the locations of the file you are trying to include. This is a security measure set in your php.ini file to protect unauthorized access to files outside of your home directory.

You should:

A. Move the file closer within the scope of your script so it can be included without error.

B. Turn off the open_basedir in your PHP.ini via the cPanel or WHM (Bad idea...)

C. Extend your permissions to allocate that certain directory to your username.

If this is a shared hosting account, then I would contact customer support for assistance in the error. The rest of the errors will go away once that one does.

I have moved file closer and I have changed $_SERVER['DOCUMENT_ROOT']
in to '/home/a7484646/public_html/'

but appear another error....

Warning: include() [function.include]: Failed opening '/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a7484646/public_html/headfoot.php on line 8

Warning: include() [function.include]: Failed opening '/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a7484646/public_html/headfoot.php on line 12



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum