timezone error meeeage

[02-May-2018 19:32:32 UTC] PHP 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /home/johnsnh/public_html/Settings.php on line 107
[02-May-2018 15:32:32 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 442
[02-May-2018 19:33:44 UTC] PHP 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /home/johnsnh/public_html/Settings.php on line 107
[02-May-2018 15:33:44 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 442
[02-May-2018 19:33:51 UTC] PHP 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /home/johnsnh/public_html/Settings.php on line 107
[02-May-2018 15:33:51 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 442
[02-May-2018 19:34:09 UTC] PHP 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /home/johnsnh/public_html/Settings.php on line 107
[02-May-2018 15:34:09 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 442

Hi everyone,

I upgraded several php files on the website to get them to the latest release. I had many issues that I figured out but I’m down to the ones listed above.

I can’t seem to figure out the problem. It’s something simple im sure but im drawing a blank.

Any help would be apprecuated.

Thanks

John

I think you may find you need to add


date_default_timezone_set('Europe/London');

or whatever your timezone is to each PHP program which uses time/date functions.

Stuart

[31-Jul-2012 18:12:17] PHP Warning: fopen(./cache/nws-alertsMainData.php): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 263
[31-Jul-2012 18:12:17] PHP Warning: fopen(./cache/nws-alertsBoxData.php): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 425
[31-Jul-2012 18:12:17] PHP Warning: fopen(./cache/nws-alertsIconData.php): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 514
[31-Jul-2012 18:12:17] PHP Warning: fopen(./cache/nws-notes.txt): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 931
[31-Jul-2012 18:12:17] PHP Warning: fputs(): supplied argument is not a valid stream resource in /home/johnsnh/public_html/nws-alerts.php on line 932
[31-Jul-2012 18:12:17] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/johnsnh/public_html/nws-alerts.php on line 933
[02-Aug-2012 13:47:37] PHP Warning: fopen(./cache/nws-alertsMainData.php): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 263
[02-Aug-2012 13:47:37] PHP Warning: fopen(./cache/nws-alertsBoxData.php): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 425
[02-Aug-2012 13:47:37] PHP Warning: fopen(./cache/nws-alertsIconData.php): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 514
[02-Aug-2012 13:47:37] PHP Warning: fopen(./cache/nws-notes.txt): failed to open stream: No such file or directory in /home/johnsnh/public_html/nws-alerts.php on line 931
[02-Aug-2012 13:47:37] PHP Warning: fputs(): supplied argument is not a valid stream resource in /home/johnsnh/public_html/nws-alerts.php on line 932
[02-Aug-2012 13:47:37] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/johnsnh/public_html/nws-alerts.php on line 933

I’m making progress, the only error messages left are listed above, any help would be appreciated.

Thanks,

John

[03-May-2018 07:52:25 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443
[03-May-2018 07:52:33 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443
[03-May-2018 07:52:41 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443
[03-May-2018 07:52:52 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443
[03-May-2018 07:53:09 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443
[03-May-2018 07:53:18 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443
[03-May-2018 07:53:25 America/New_York] PHP Notice: Undefined variable: string in /home/johnsnh/public_html/common.php on line 443

I have been able to clear up most of the error messages except the one listed above.

I changed this line in Settings

$SITE['copyr']			= '© ' . date("Y",time()) . ', johnsnhweather'; to [/sup] $SITE['copyr']			= '© ' . gmdate("Y",time()) . ', johnsnhweather';

That change got rid of a lot of errors.

Any help would be appreciated.

Thanks,

John