I'm trying to move a website to another hosting, but I get some errors, the website was build by someone I cannot reach anymore so I need to solve this issue by myself and of course with your help.
I think the issue is linked with the path of the files, but not 100% sure. If someone could help me solve my issue, I would really appreciate. Thank you.
This are the errors:
Code: Select all
Deprecated: Assigning the return value of new by reference is deprecated in /home/vol7_5/byethost7.com/b7_15102602/va.likesyou.org/htdocs/__kernel/loader.php on line 80
Strict Standards: Declaration of php4DOMDocument::dump_node() should be compatible with php4DOMNode::dump_node() in /home/vol7_5/byethost7.com/b7_15102602/va.likesyou.org/htdocs/__kernel/domxml-php4-to-php5.php on line 1
Fatal error: Call to undefined function session_unregister() in /home/vol7_5/byethost7.com/b7_15102602/va.likesyou.org/htdocs/__kernel/cot.lib.php on line 64
Code: Select all
<?PHP
if(!session_id()) session_start();
$_SESSION['ERROR']=0;
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Expires: " . date("r", time()));
header("Content-type: text/html; charset=windows-1251");
// defining absolute path
// for hosting host.md
function LOADER_DOCUMENT_ROOT($path=false) {
if (!$path) { $path=preg_replace("/\\\\/","/",realpath(dirname(__FILE__))); }
$result=substr($path,-strlen($path),strpos($path,"public_html"))."public_html";
if ($result=="public_html") { $result=$_SERVER['DOCUMENT_ROOT']; }
return $result;
}
$HOST_MD_REAL_PATH=LOADER_DOCUMENT_ROOT();
include_once($HOST_MD_REAL_PATH."/__config/config.inc.php");
// check for the existence of settings.php
$need_inst=false;
if (!file_exists($HOST_MD_REAL_PATH."/settings.php"))
{
$need_inst=true;
}
if (@filesize($HOST_MD_REAL_PATH."/settings.php")===0)
{
$need_inst=true;
}
if ($need_inst)
{
$inst_txt="<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>";
$inst_txt.="<title>COT.CMS Version 1.2 - Error: No configuration!</title>";
$inst_txt.="<style>body{font: 84.5% Verdana, Arial, Helvetica, sans-serif;}</style></head><body>";
$inst_txt.="<br><br><center><strong>COT.CMS Version 1.2</strong>";
$inst_txt.="<p><font color='red'>Fatal error: no configuration.</font><br> Reinstall the system.<br>";
echo $inst_txt; exit;
}
if (file_exists($HOST_MD_REAL_PATH."/install.php"))
{
$inst_txt="<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>";
$inst_txt.="<title>COT.CMS Version 1.2 - Installation is not completed!</title>";
$inst_txt.="<style>body{font: 84.5% Verdana, Arial, Helvetica, sans-serif;}</style></head><body>";
$inst_txt.="<br><br><center><strong>COT.CMS Version 1.2</strong>";
$inst_txt.="<p><font color='red'>Installation is not complete! Delete the file install.php !</font><br>";
echo $inst_txt; exit;
}
include_once($HOST_MD_REAL_PATH."/settings.php");
require_once($HOST_MD_REAL_PATH."/__lang/russian-win-1251_s.inc.php");
if (version_compare(PHP_VERSION,'5','>='))
{
require_once('domxml-php4-to-php5.php');
}
require_once("cot.lib.php");
require_once("kernel.lib.php");
require_once("writeresponse.php");
$XML=domxml_new_doc("1.0");
$Root=$XML->create_element($GLOBALS['cfg']['XML']['Root']);
$XML->append_child($Root);
foreach ($GLOBALS['mod'] as $key=>$value)
{
if (!$value['status'])
{
$inc_path=my_getAbsPath($value['Path']);
if ($inc_path)
{
require_once($inc_path);
}
} next($mod);
}
$DB=&new MySQLClass();
$DB->openDB($GLOBALS['cfg']['MySQL']['host'],$GLOBALS['cfg']['MySQL']['user'],$GLOBALS['cfg']['MySQL']['password'],$GLOBALS['cfg']['MySQL']['database']);
if ($DB->err)
{
_catch(1);
};
?>Code: Select all
<?php
function isNum($val)
{
(preg_match("/^\d+$/",$val)) ? $res=true:$res=false;return $res;
}
function c($str_value)
{
return @iconv("windows-1251","UTF-8",$str_value);
}
function my_getAbsPath($path)
{
return realpath($GLOBALS['cfg']['Server']['root'].$path);
}
function httpGet($var)
{
if (isset($_GET[$var])) return trim($_GET[$var]);else return false;
}
function httpPost($var)
{
if (isset($_POST[$var])) return trim($_POST[$var]);else return false;
}
function httpCookie() { }
function httpSess($var)
{
if(isset($_SESSION[$var])) return $_SESSION[$var];else return false;
}
function mem_state($var,$sesvar)
{
if ($var!="")
{
$_SESSION[$sesvar]=$var;
}
elseif (httpSess($sesvar)!="")
{
$var=httpSess($sesvar);
}
else
{
$_SESSION[$sesvar]="";
}
return $var;
}
function clearSess()
{
if(!session_id()) session_start();
$_SESSION=array();
if (isset($_COOKIE[session_name()])) setcookie(session_name(),'',time()-42000,'/');
session_destroy();
}
function _catch($flag=0)
{
$ret=0;
($flag)?$sessname="_ERROR_":$sessname="_MESSAGE_";
if (httpSess($sessname))
{
$ret=httpSess($sessname);
session_unregister($sessname);
unset($_SESSION[$sessname]);
unset($sessname);
}
return $ret;
}
function _throw($code=0,$flag=0)
{
($flag)?$sessname="_ERROR_":$sessname="_MESSAGE_";
$_SESSION[$sessname]=$code;
}
function getRandomStringN($numchars=8)
{
$ret="";
$a ="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
for($i=0;$i<$numchars;$i++) $ret.=substr($a,rand(0,strlen($a)),1);
return $ret;
}
function getRandomString()
{
return md5(microtime().rand());
}
//date from the database comes as timestamp, returns an array with the date
function dateFromBase($date)
{
$ret['year']=date("Y",$date);
$ret['month']=date("m",$date);
$ret['day']=date("d",$date);
$ret['hour']=date("H",$date);
$ret['minute']=date("i",$date);
$ret["second"]=date("s",$date);
return $ret;
}
//comes an array, returns the timestamp
function date2Base($date)
{
$ret=time();
if (is_array($date))
{
$date['year']=(key_exists('year',$date))?$date['year']:date("Y");
$date['month']=(key_exists('month',$date))?$date['month']:date("m");
$date['day']=(key_exists('day',$date))?$date['day']:date("d");
$date['hour']=(key_exists('hour',$date))?$date['hour']:date("H");
$date['minute']=(key_exists('minute',$date))?$date['minute']:date("i");
$date['second']=(key_exists('second',$date))?$date['second']:date("s");
$ret=date("U",mktime($date['hour'],$date['minute'],$date['second'],$date['month'],$date['day'],$date['year']));
}
return $ret;
}
//check the array with the date
function checkDateArr($formDate)
{
$formDate['year']=(isNum($formDate['year']))?$formDate['year']:date('Y');
$formDate['month']=(isNum($formDate['month']))?$formDate['month']:date('m');
$formDate['day']=(isNum($formDate['day']))?$formDate['day']:date('d');
$formDate['hour']=(isNum($formDate['hour']))?$formDate['hour']:date('H');
$formDate['minute']=(isNum($formDate['minute']))?$formDate['minute']:date('i');
return $formDate;
}
?>
