www.webdeveloper.com
Results 1 to 3 of 3

Thread: Move website to another hosting - issues

  1. #1
    Join Date
    Jul 2014
    Posts
    3

    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
    22,327
    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.)
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Jul 2014
    Posts
    3
    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

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.17615 seconds
  • Memory Usage 2,959KB
  • Queries Executed 15 (?)
More Information
Template Usage (34):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (8)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (3)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates