Cannot get anywhere withis this Time Zone error:
Warning: mktime() [function.mktime]: 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 'EST/-5.0/no DST' instead in /includes/counter.php on line 27
I have put this code in the php.ini code but did not fix the problem. I might be on th wrong track:
register_globals = On
// US TimeZones according to DateTime's official "List of Supported Timezones"
$aTimeZones = array(
'America/New_York'=>'EDT',
);
?>
Latest News: (loading..)
Warning: mktime() [function.mktime]: Can't seem to solve this time zone thing
Started by ecgbyme, Jan 15 2012, 01:03
4 replies to this topic
#1
Posted 15 January 2012, 01:03
#2
Posted 15 January 2012, 05:18
php 5, you should not have register_globals enabled.
If your osC version requires register_globals to be enabled consider upgrading.
As for the timezone have a loo here. This is a part of osC 2.3.
Click Me
If your osC version requires register_globals to be enabled consider upgrading.
As for the timezone have a loo here. This is a part of osC 2.3.
Click Me
Edited by bktrain, 15 January 2012, 05:19.
Remember to backup database, files and pictures.
I reject your reality and substitute my own.
My mind not only wanders, it sometimes leaves completely.
The problem with the gene pool is that there is no lifeguard.
Everyone’s entitled to my opinion.
Links
Security
SSL Help
Basics for design
Basics for design V2.3+
How Do I ...?
I reject your reality and substitute my own.
My mind not only wanders, it sometimes leaves completely.
The problem with the gene pool is that there is no lifeguard.
Everyone’s entitled to my opinion.
Links
Security
SSL Help
Basics for design
Basics for design V2.3+
How Do I ...?
#3
Posted 15 January 2012, 17:25
bktrain, on 15 January 2012, 05:18, said:
php 5, you should not have register_globals enabled.
If your osC version requires register_globals to be enabled consider upgrading.
As for the timezone have a loo here. This is a part of osC 2.3.
Click Me
If your osC version requires register_globals to be enabled consider upgrading.
As for the timezone have a loo here. This is a part of osC 2.3.
Click Me
Thanks for your response Brian!
I install the code for /includes/functions/campatability.php which created this parse error which is in the new code:
Parse error: syntax error, unexpected '}' in /includes/functions/compatibility.php on line 57
Here is the code. Line 57 is the first curly bracket in bold:
do_magic_quotes_gpc($HTTP_COOKIE_VARS);
}
+// set default timezone if none exists (PHP 5.3 throws an E_WARNING)
+ if ((strlen(ini_get('date.timezone')) < 1) && function_exists('date_default_timezone_set')) {
+ date_default_timezone_set(@date_default_timezone_get());
+ }
+
if (!function_exists('array_splice')) {
function array_splice(&$array, $maximum) {
if (sizeof($array) >= $maximum) {
if (!function_exists('array_reverse')) {
function array_reverse($array) {
for ($i=0, $n=sizeof($array); $i<$n; $i++) $array_reversed[$i] = $array[($n-$i-1)];
return $array_reversed;
}
So I removed the curly bracket. Then I got this Parse error in the new code::
Parse error: syntax error, unexpected T_IF in /includes/functions/compatibility.php on line 59
Line 59 is in bold:
do_magic_quotes_gpc($HTTP_COOKIE_VARS);
+// set default timezone if none exists (PHP 5.3 throws an E_WARNING)
+ if ((strlen(ini_get('date.timezone')) < 1) && function_exists('date_default_timezone_set')) {
+ date_default_timezone_set(@date_default_timezone_get());
+ }
+
if (!function_exists('array_splice')) {
function array_splice(&$array, $maximum) {
if (sizeof($array) >= $maximum) {
if (!function_exists('array_reverse')) {
function array_reverse($array) {
for ($i=0, $n=sizeof($array); $i<$n; $i++) $array_reversed[$i] = $array[($n-$i-1)];
return $array_reversed;
}
}
Are there syntax errors in this code? Thanks!
#4
Posted 15 January 2012, 18:00
By the way, fixed Time Zone problem in Admin side by dropping in admin/includes/functions/campatibility.php from Mort-lemur's contribution: osCommerce_RC2a_PHP_5.3 V2.1.1
But still have the problem as above in the catalog viewed online side.
Oh, as above I'm not sure if I should have removed the squiggle bracket. }
But still have the problem as above in the catalog viewed online side.
Oh, as above I'm not sure if I should have removed the squiggle bracket. }
#5
Posted 15 January 2012, 23:20
I got it! I just didn't have it placed in the exact right spot.
The COOKIE _VARS I beleive I had doubled.
Thank You! Brian
The COOKIE _VARS I beleive I had doubled.
Thank You! Brian














