Author |
Message |
dad7732
RavenNuke(tm) Development Team

Joined: Mar 18, 2007
Posts: 1242
|
Posted:
Mon Dec 30, 2013 11:20 am |
|
www.pondlady.com customer issue:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 'CST/-6.0/no DST' instead in /home/jay/www/pondlady.com/includes/counter.php on line 57
No idea how to fix. Had a MySQL problem, was fixed and this showed up afterwards. |
|
|
|
 |
neralex
Site Admin

Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Dec 30, 2013 3:19 pm |
|
open your mainfile.php and search:
Code:if (stristr(htmlentities($_SERVER['PHP_SELF']), 'mainfile.php')) {
header('Location: index.php');
exit();
}
|
add after:
Code:if (@ini_get('date.timezone') == '') {
date_default_timezone_set("America/New_York");
}
|
Other possible timezones you can find here:
http://www.php.net/manual/en/timezones.php |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
 |
dad7732

|
Posted:
Mon Dec 30, 2013 5:23 pm |
|
Only thing that changes was the Online Now block, everything else is the same. |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Mon Dec 30, 2013 7:29 pm |
|
This is one those that came in due to changes in the PHP build itself. Unfortunately it is going to affect a ton of files - every file that uses date() or manipulates dates.
Maybe use a bigger hamer on this one
Code:
$locale = 'en_US'; //adjust as needed
$timezone = 'Africa/Casablanca'; // adjust as needed
date_default_timezone_set($timezone);
setlocale(LC_TIME, $locale . '.UTF-8', $locale . '.UTF8', $locale);
setlocale(LC_NUMERIC,'C');
setlocale(LC_CTYPE, 'C');
|
|
|
|
|
 |
dad7732

|
Posted:
Mon Dec 30, 2013 7:43 pm |
|
I assume this code goes in mainfile.php in place of the one that neralex supplied. |
|
|
|
 |
Guardian2003

|
Posted:
Mon Dec 30, 2013 7:48 pm |
|
Sorry, yes, that is correct.
In this instance I would probably not do the ini_get() check because it might not hold a valid value. You could always add it back after you test. |
|
|
|
 |
dad7732

|
Posted:
Mon Dec 30, 2013 7:52 pm |
|
That didn't change anything. Unless there is some other suggestion I think I am wasting time on this old Nuke version but the customer wanted to hold on to it. No point in that, especially with the outdated Odyssey theme. I even copied a newer mainfile.php but that didn't change anything either. Problem I think is somewhere else and to be more confusing this particular site is the ONLY one with the problem. Must be an old file somewhere. And BTW we had a major MySQL meltdown but didn't affect the other domains, just this one with the timezone errors. |
|
|
|
 |
dad7732

|
Posted:
Tue Dec 31, 2013 6:50 am |
|
Thanks for all the attention but I fixed the issue by upgrading to RN 2.5x and now all I have to do is to convince the client to move FAR away from that old Odyssey theme.
 |
|
|
|
 |
|