View Full Version : Transfer site...goes boom

01-23-2007, 06:45 PM
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.

01-23-2007, 08:24 PM
http://uk.php.net/manual/en/function.date-default-timezone-set.php ?

01-23-2007, 08:48 PM
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:

if(!isset($errno)) {
$errno=0; //or some error-number that represents 'other'?
$err .= "\t<errortype>" . $errortype[$errno] . "</errortype>\n";

01-23-2007, 09:33 PM
i got rid of the time error by putting this in my code


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

01-23-2007, 10:21 PM
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...?

01-23-2007, 11:11 PM
This is the error section of the 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_ERROR, E_USER_WARNING, E_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";
$content = ob_get_contents();
$err .= "\t<![CDATA[" . $content . "]]>\n";

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/>");
$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);

this is what the site is suppost to look like

The images are not showing up since the domain is pointed to the new server

01-23-2007, 11:14 PM
uncomment the E_STRICT line...

01-23-2007, 11:24 PM
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

01-23-2007, 11:47 PM
When you uncomment it do you add a comma to the end of the previous line?
That could explain the new error.

E_USER_NOTICE => "User Notice",
E_STRICT => "Runtime Notice"

01-23-2007, 11:51 PM
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.

01-23-2007, 11:57 PM
Well you've made it through the parsing, and now the haywire behavior is the code actually running.

So that's actually progress! :D