Mod-Jay Posted December 11, 2010 Share Posted December 11, 2010 I have a Xampp Timezone Error Error Warning: strtotime() [function.strtotime]: 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/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\NoXIp\Toplist\inc\vote.php on line 56 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' NOW())' at line 1 Line 56 $diffrence = time() - strtotime($getDate['lastVoteDate']); The Date Function in Php.ini [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = "America/New_York" date.timezone = "America/New_York" ; http://php.net/date.default-latitude ;date.default_latitude = 31.7667 ; http://php.net/date.default-longitude ;date.default_longitude = 35.2333 ; http://php.net/date.sunrise-zenith ;date.sunrise_zenith = 90.583333 ; http://php.net/date.sunset-zenith ;date.sunset_zenith = 90.583333 Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted December 11, 2010 Share Posted December 11, 2010 potentially important part of that notice: We selected 'America/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\NoXIp\Toplist\inc\vote.php on line 56 what's on line 56 of vote.php? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 Either Apache wasn't restarted, or you edited the wrong copy of php.ini, most likely. And why is date.timezone in there twice? Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 potentially important part of that notice: We selected 'America/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\NoXIp\Toplist\inc\vote.php on line 56 what's on line 56 of vote.php? Are you blind? it says it right there Line 56 Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted December 11, 2010 Share Posted December 11, 2010 so line 56 of vote.php says "Line 56"? Well, there's your problem right there. But perhaps I'm not the blind one. the error is telling you straight out that the problem is the use of -5.0/no DST on line 56 of vote.php. Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 so line 56 of vote.php says "Line 56"? Well, there's your problem right there. Wow, You really are blind. Line 56 on Vote.php $diffrence = time() - strtotime($getDate['lastVoteDate']); Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted December 11, 2010 Share Posted December 11, 2010 yep, my bad. i didn't see the post. but you didn't have to be such a @$%@ about it. I won't bother trying to help YOU again. meh! Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 yep, my bad. i didn't see the post. but you didn't have to be such a @$%@ about it. I won't bother trying to help YOU again. meh! Yup.. i agree, i wouldn't want to help myself either. I have restarted Apache and it show the same error, Anymore help? Please Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 Check the results of phpinfo() to make sure you edited the php.ini file that shows up as the 'Loaded Configuration File'. Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 I did Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 See what you get from: echo date_default_timezone_get() Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 Error Warning: date_default_timezone_get() [function.date-default-timezone-get]: 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/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\phpinfo.php on line 3 America/New_York Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 You can put it at the top of the script that's giving you problems, or create a new script and paste it in. Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 You can put it at the top of the script that's giving you problems, or create a new script and paste it in. got a(n) Error Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 And that error would be what, exactly? Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 Posted it above Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 Something isn't adding up here. Have you searched your php.ini file to see if there's a line in it that contains -5.0/no DST? Paste this at the top of the script and see if the error disappears. If it does, either that value in php.ini is being overwritten later in the file, or that php.ini file is not the one being used by php. date_default_timezone_set("America/New_York"); Quote Link to comment Share on other sites More sharing options...
Mod-Jay Posted December 11, 2010 Author Share Posted December 11, 2010 Something isn't adding up here. Have you searched your php.ini file to see if there's a line in it that contains -5.0/no DST? Paste this at the top of the script and see if the error disappears. If it does, either that value in php.ini is being overwritten later in the file, or that php.ini file is not the one being used by php. date_default_timezone_set("America/New_York"); There was no line but i search it with windows 7 and 5 other files came up. i placed that in the php.ini spot where it should go and it still isnt working. i have team viewer if you want to look for yourself Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted December 11, 2010 Share Posted December 11, 2010 The line above should go in the script that is generating the error, not in php.ini. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.