Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Transfer site...goes boom

    We recently aquired a site from another person.

    It was on their server whcih was a linux server running WHM and cPanel

    We only have a windows box running plesk, with php5

    Everything has been sucesfully transfured including the mySql server, but when you goto the domain you get these two errors, repeated over and over again

    Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for '-6.0/no DST' instead in C:\Inetpub\vhosts\funnyvideos.sc\httpdocs\common\debug.php on line 74

    Notice: Undefined offset: 2048 in C:\Inetpub\vhosts\funnyvideos.sc\httpdocs\common\debug.php on line 95


    the debug.php lines that it gives the error are this:

    Line 74---> $dt = date("Y-m-d H:i:s (T)");

    Line 95---> $err .= "\t<errortype>" . $errortype[$errno] . "</errortype>\n";

    you see a lot of errors up top. I have changed just about everythign i can think of and right now i am at a loss. Does anyone have any fresh ideas that they can give me to be me a new spin on things.
    Last edited by Athmaus; 01-23-2007 at 06:49 PM. Reason: more info

  • #2
    Regular Coder
    Join Date
    May 2006
    Location
    Wales
    Posts
    820
    Thanks
    1
    Thanked 82 Times in 79 Posts

  • #3
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    it's likely that the level of error-reporting on the server is lower than you have it on your machine (which, if it was a live site, is a fairly sensible thing if you can be fairly sure there are no inherent errors!)

    Take a look at the link above, and the manual page for date() for the first problem.

    The second is assuming that $errno is always going to be set at that point, without knowing the logic behind what that is doing it's difficult to suggest a fix, but perhaps:
    PHP Code:
    if(!isset($errno)) {
      
    $errno=0//or some error-number that represents 'other'?
    }
    $err .= "\t<errortype>" $errortype[$errno] . "</errortype>\n"
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #4
    New Coder
    Join Date
    Apr 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i got rid of the time error by putting this in my code

    Code:
    date_default_timezone_set("America/Chicago");
    Still not so much luck with the second error. Right now hopping to get all the pages aligned as they are still messing up.

    the page is actually here www.funnyvideos.sc

    The page is not actually lined up and not pulling from the various sites like it should. Right now thinking it is somethign wrong with the templates or it is askign for a file that isn't there.

    Hard to really debug since it isn't my code and tons of code in there.

    Thanks for the tip on the time/date

  • #5
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    it's trying to do something with error-number 2048, but there is no $errortype[2048] so it's complaining. Can you find where the $errortype array is defined? it might give a clue as to what 2048 should be, or whether you can just add something...?
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #6
    New Coder
    Join Date
    Apr 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is the error section of the code.


    PHP Code:
    function ErrorHandler($errno$errmsg$filename$linenum$vars)
    {
       
    $dt date("Y-m-d H:i:s (T)");  
       
    $errortype = array (
                   
    E_ERROR          => "Error",
                   
    E_WARNING        => "Warning",
                   
    E_PARSE          => "Parsing Error",
                   
    E_NOTICE          => "Notice",
                   
    E_CORE_ERROR      => "Core Error",
                   
    E_CORE_WARNING    => "Core Warning",
                   
    E_COMPILE_ERROR  => "Compile Error",
                   
    E_COMPILE_WARNING => "Compile Warning",
                   
    E_USER_ERROR      => "User Error",
                   
    E_USER_WARNING    => "User Warning",
                   
    E_USER_NOTICE    => "User Notice"
                  
    // E_STRICT          => "Runtime Notice"
                   
    );
       
    // set of errors for which a var trace will be saved
       
    $user_errors = array(E_USER_ERRORE_USER_WARNINGE_USER_NOTICE);
       
    $err  ="<xml version = '1.1'>";
       
    $err .= "<errorentry>\n";
       
    $err .= "\t<datetime>" $dt "</datetime>\n";
       
    $err .= "\t<errornum>" $errno "</errornum>\n";
       
    $err .= "\t<errortype>" $errortype[$errno] . "</errortype>\n";
       
    $err .= "\t<errormsg>" $errmsg "</errormsg>\n";
       
    $err .= "\t<scriptname>" $filename "</scriptname>\n";
       
    $err .= "\t<scriptlinenum>" $linenum "</scriptlinenum>\n";
       
    ob_start();
       echo(
    "<pre>");
       
    print_r($_SERVER);
       echo(
    "</pre>");
       
    $content ob_get_contents();
       
    $err .= "\t<![CDATA[" $content "]]>\n";
       
    ob_end_clean();

       if (
    in_array($errno$user_errors)) {
          if (
    function_exists("wddx_serialize_value")) {
                 
    $err .= "\t<vartrace>" wddx_serialize_value($vars"Variables") . "</vartrace>\n";
            } else {
                
    //$err .= "\t&lt;vartrace&gt;" . wddx_serialize_value($vars, "Variables") . "&lt;/vartrace&gt;\n";    
            
    }
       } else {
            
    //echo($errortype[$errno] . " Filename: " . $filename . " Line: " . $linenum . " Error: " . $errmsg . "<br/>");
            
    return;
        }
       
    $err .= "</errorentry>\n\n";  
       
    //error_log($err, 3, $_SERVER["DOCUMENT_ROOT"] . "error.log");
       
        
    if ($errno == E_USER_ERROR) {
           
    //mail("support@internetpei.com", "Critical User Error", $err);
       
    }
        
    fatal($err);

    this is what the site is suppost to look like http://122.192.232.72.reverse.layere...com/~funnyvid/

    The images are not showing up since the domain is pointed to the new server
    Last edited by Athmaus; 01-23-2007 at 11:15 PM. Reason: more info

  • #7
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    uncomment the E_STRICT line...
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #8
    New Coder
    Join Date
    Apr 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    that snippit is actually in the debug.php file

    when i uncomment i get this error

    Parse error: parse error, unexpected T_STRING, expecting ')' in C:\Inetpub\vhosts\funnyvideos.sc\httpdocs\common\debug.php on line 87

  • #9
    Regular Coder anarchy3200's Avatar
    Join Date
    Mar 2003
    Location
    England
    Posts
    261
    Thanks
    0
    Thanked 1 Time in 1 Post
    When you uncomment it do you add a comma to the end of the previous line?
    That could explain the new error.
    Code:
    E_USER_NOTICE    => "User Notice",
    E_STRICT          => "Runtime Notice"
    Mike

  • #10
    New Coder
    Join Date
    Apr 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah that is a stupid mistake on my end.

    when i do that, the entire site goes haywire, none of my css docs are read at all, pretty much all you see is my google adwords listed.

    I am beginning to this i just needa get a new linux server and forgo putting this on windows server.

  • #11
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Well you've made it through the parsing, and now the haywire behavior is the code actually running.

    So that's actually progress!


  •  

    Posting Permissions

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