www.webdeveloper.com
Results 1 to 3 of 3

Thread: Move website to another hosting - issues

  1. #1
    Join Date
    Jul 2014
    Posts
    2

    Move website to another hosting - issues

    Hello,

    I'm trying to move a website to another hosting, but I get some errors and the website won't work, 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:
    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

    loader.php:
    PHP Code:
    <?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);
    };
    ?>
    cot.lib.php:
    PHP Code:
    <?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;
    }
    ?>

    http://i.imgur.com/QbUohhJ.jpg
    http://i.imgur.com/aXYKR6l.jpg

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,617
    You can get rid of this line, since the next line takes care of it the "proper" way:
    PHP Code:
    session_unregister($sessname); 
    Any place you have something like this...
    PHP Code:
    $DB=&new MySQLClass(); 
    ...just get rid of the "&"...
    PHP Code:
    $DB = new MySQLClass(); 
    The "strict" warning will require more time to dig into than I have right now, but the crux of the matter is that apparently you have a child class extending a parent class, with the child overriding a method in the parent class using a different set of arguments. (Hopefully that may point someone else -- if not you -- to the solution.)
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jul 2014
    Posts
    2
    Quote Originally Posted by NogDog View Post
    You can get rid of this line, since the next line takes care of it the "proper" way:
    PHP Code:
    session_unregister($sessname); 
    I remove that line, but now I get another error:

    Fatal error: Incompatible file format: The encoded file has format major ID 3, whereas the Loader expects 5 in /home/vol7_5/byethost7.com/b7_15102602/va.likesyou.org/htdocs/code/code.php on line 0

    code.php: http://i.imgur.com/j9etmyC.jpg

    Any place you have something like this...
    PHP Code:
    $DB=&new MySQLClass(); 
    ...just get rid of the "&"...
    PHP Code:
    $DB = new MySQLClass(); 
    I got rid of the & and the error went away.

    What about this error: 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

    domxml-php4-to-php5.php: http://textuploader.com/kz2l

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles