Upgrade problem functions.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • willy888
    Member
    • Dec 2007
    • 73

    Upgrade problem functions.php

    My site is ultragreek.com
    I upgrate from 4.1.2. to 4.2.2 and I have full all page with this error
    Code:
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 4912
    
    Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 5104
    
    Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 5104
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in ..../includes/functions.php on line 5104
    I can't login to admincp

    Code:
    Warning: Cannot modify header information - headers already sent by (output started at ..../includes/class_core.php:5745) in ..../includes/functions.php on line 5588
    No cookies
    file: ....../forums/includes/class_core.php
    line: 5745
    I did reupload the new files and make upgrade again but I have the same error
    Last edited by willy888; Wed 9 Oct '13, 12:12am.
  • babyinternet
    New Member
    • Mar 2008
    • 6
    • 4.2.X

    #2
    Same error. How to fix ?
    We are Webmaster Vietnam Forum.

    Comment

    • [RDH]Razor[OT]
      Member
      • May 2007
      • 54
      • 3.6.x

      #3
      Same issue! What has to be done to fix this?

      Code:
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]4912[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5038[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5038[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5050[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      
      [B]Warning[/B]: getdate() [[URL="http://www.rabiddogsofhell.us/forums/function.getdate"]function.getdate[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../modules/minicalendar.php[/B] on line [B]17[/B]
      
      [B]Warning[/B]: date() [[URL="http://www.rabiddogsofhell.us/forums/function.date"]function.date[/URL]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Los_Angeles' for 'PDT/-7.0/DST' instead in [B]..../includes/functions.php[/B] on line [B]5104[/B]
      "Defeat is not the worst of failures. Not to have tried is the true failure."

      George E. Woodberry

      Comment

      • Avimelech
        New Member
        • Jul 2006
        • 16

        #4
        Same here after uploading 4.2.2 and upgrading. If there is not a reply soon I'll have to go back to the 4.2.1 I had going.

        This has never happened to me with a vbulletin upgrade, but I guess now that I am on the previous major version (4 instead of 5), this is what can happen?

        Comment

        • boggseric
          Member
          • Sep 2009
          • 46
          • 3.8.x

          #5
          Found in another thread, I added:
          date.timezone="America/New_York"

          to my php.ini file and started apache and the error when away.
          ​Running php 5.2.17​
          Last edited by boggseric; Wed 9 Oct '13, 7:40am. Reason: added php verison I'm running

          Comment

          • willy888
            Member
            • Dec 2007
            • 73

            #6
            I made the mistake to upgrade to 4.2.2 and I have all day my site off
            Is there any solution to this problem , I can't login to admin panel either .
            What can I do ?

            Comment

            • Carmichael
              New Member
              • Jul 2013
              • 1
              • 4.2.X

              #7
              I have the same problem. I upgraded and now my site is offline and everyone gets this error. Anyone have a solution to this problem. Where are the vbulletin techs.

              Code:
              [B]Warning[/B][COLOR=#000000][FONT=Times New Roman]: date() [[/FONT][/COLOR][URL="http://partnersincombat.com/function.date"]function.date[/URL][COLOR=#000000][FONT=Times New Roman]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in [/FONT][/COLOR][B]..../includes/functions.php[/B][COLOR=#000000][FONT=Times New Roman] on line [/FONT][/COLOR][B]4912[/B]
              
              [B]Warning[/B][COLOR=#000000][FONT=Times New Roman]: date() [[/FONT][/COLOR][URL="http://partnersincombat.com/function.date"]function.date[/URL][COLOR=#000000][FONT=Times New Roman]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in [/FONT][/COLOR][B]..../includes/functions.php[/B][COLOR=#000000][FONT=Times New Roman] on line [/FONT][/COLOR][B]5104[/B]
              
              [B]Warning[/B][COLOR=#000000][FONT=Times New Roman]: date() [[/FONT][/COLOR][URL="http://partnersincombat.com/function.date"]function.date[/URL][COLOR=#000000][FONT=Times New Roman]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in [/FONT][/COLOR][B]..../includes/functions.php[/B][COLOR=#000000][FONT=Times New Roman] on line [/FONT][/COLOR][B]5104[/B]
              
              [B]Warning[/B][COLOR=#000000][FONT=Times New Roman]: date() [[/FONT][/COLOR][URL="http://partnersincombat.com/function.date"]function.date[/URL][COLOR=#000000][FONT=Times New Roman]]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'CDT/-5.0/DST' instead in [/FONT][/COLOR][B]..../includes/functions.php[/B][COLOR=#000000][FONT=Times New Roman] on line [/FONT][/COLOR][B]5104[/B]

              Comment

              • Wayne Luke
                vBulletin Technical Support Lead
                • Aug 2000
                • 74132

                #8
                This is a server configuration issue and should be set at the server level in the php.ini file. However you can override the issue by setting a locale in your config.php file.

                See: http://php.net/manual/en/function.da...mezone-set.php

                You would use something like:

                date_default_timezone_set ('America/Los_Angeles');

                You can find all timezones here: http://www.php.net/manual/en/timezones.php

                Really should be set in the php.ini file in this section of code:
                Code:
                [noparse]
                [Date]
                ; Defines the default timezone used by the date functions
                ; http://php.net/date.timezone
                date.timezone = "America/Los_Angeles"
                
                ; http://php.net/date.default-latitude
                date.default_latitude = 34.3981
                
                ; http://php.net/date.default-longitude
                date.default_longitude = 118.1358
                
                ; http://php.net/date.sunrise-zenith
                ;date.sunrise_zenith = 90.583333
                
                ; http://php.net/date.sunset-zenith
                ;date.sunset_zenith = 90.583333
                [/noparse]
                Turning display errors off would also eliminate the problem. They aren't errors, simply warnings. They are due to how PHP has changed over the years. Previous to vBulletin 4.2.2, they were suppressed because vBulletin didn't know how to deal with them.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

                • willy888
                  Member
                  • Dec 2007
                  • 73

                  #9
                  Thanks a lot
                  I add in config php this line and all ok now
                  Code:
                  date_default_timezone_set ('America/Los_Angeles');

                  Comment

                  • willy888
                    Member
                    • Dec 2007
                    • 73

                    #10
                    I try to find this php.ini file and I didn't
                    Only in cpanel there is a php.ini QuickConfig and I can't change the code

                    Comment

                    • bogley
                      Member
                      • Dec 2009
                      • 95
                      • 3.8.x

                      #11
                      Originally posted by willy888
                      Thanks a lot
                      I add in config php this line and all ok now
                      Code:
                      date_default_timezone_set ('America/Los_Angeles');
                      Can you tell me exactly where you added this line of code?

                      Thanks

                      Comment

                      • Wayne Luke
                        vBulletin Technical Support Lead
                        • Aug 2000
                        • 74132

                        #12
                        Originally posted by bogley
                        Can you tell me exactly where you added this line of code?

                        Thanks
                        Anywhere after the line with <?php
                        Translations provided by Google.

                        Wayne Luke
                        The Rabid Badger - a vBulletin Cloud demonstration site.
                        vBulletin 5 API

                        Comment

                        • fholbert
                          Member
                          • Oct 2007
                          • 72

                          #13
                          Good fix guys!!!

                          I upgraded 4.08 to 4.2.2 today and got the
                          Warning: date() [function.date]: It is not safe to rely on the system's timezone settings... error message.
                          I spent an hour looking for the file php.ini you speak of with no luck. I finally called HostGator support and was told there isn't a php.ini but he was happy to make one for me and put it in /. Two minutes later there with was. I went to the first line of php.ini and added: <?php date.timezone="Greenwich" Issue resolved! To be honest I was kind of surprised it was that easy to fix.

                          Comment

                          • psypher
                            New Member
                            • Dec 2009
                            • 10
                            • 4.0.0

                            #14
                            I added the php.ini file and the errors are no longer on my main pages but I still cannot access my admin control panel, it is full of the time zone errors and will not load. Upgrading to this buggy version was a huge mistake.

                            Comment

                            • Zachery
                              Former vBulletin Support
                              • Jul 2002
                              • 59097

                              #15
                              Then you can use the secondary option, to disable the errors, which is available in the 4.2.2 release thread. The version is not buggy, the version enabled displaying errors.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...