Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Mon Dec 30, 2013 11:20 am Reply with quote

[ Only registered users can see links on this board! Get registered or login! ] 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.
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Mon Dec 30, 2013 3:19 pm Reply with quote

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:
[ Only registered users can see links on this board! Get registered or login! ]

_________________
Github: RavenNuke 
View user's profile Send private message
dad7732







PostPosted: Mon Dec 30, 2013 5:23 pm Reply with quote

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

PostPosted: Mon Dec 30, 2013 7:29 pm Reply with quote

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');
 
View user's profile Send private message Send e-mail
dad7732







PostPosted: Mon Dec 30, 2013 7:43 pm Reply with quote

I assume this code goes in mainfile.php in place of the one that neralex supplied.
 
Guardian2003







PostPosted: Mon Dec 30, 2013 7:48 pm Reply with quote

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







PostPosted: Mon Dec 30, 2013 7:52 pm Reply with quote

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







PostPosted: Tue Dec 31, 2013 6:50 am Reply with quote

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.

Rolling Eyes
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©