Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kurt@triffetdesi
    Senior Member
    • Mar 2008
    • 120

    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.

    Moving this issue from another thread. Upgraded from 3.8.1 to 4.2.2 and immediately got the timezone error issue, which also locks the admin out of the cp.
    Tried suppressing the message with both:
    define('SKIP_ALL_ERRORS', true);
    define('DISABLE_HOOKS', true);

    Nothing works.

    Got on phone with my hosting company, Web.com, who say that the calendar tests perfectly and say that the problem has to be with how the software is written.
    PHP 5.2.17 is what they currently run.

    Site has been down a day now, and no closer to getting this resolved. Would really appreciate some real help on this.
  • donald1234
    Senior Member
    • Oct 2011
    • 1953
    • 4.1.x

    #2
    Tell them they need to set the timezone in the /etc/php.ini file.

    Comment

    • kurt@triffetdesi
      Senior Member
      • Mar 2008
      • 120

      #3
      They cannot because they say nothing is wrong. We need a workaround. I really need some support on this!!!
      Last edited by kurt@triffetdesi; Wed 16 Apr '14, 3:11pm.

      Comment

      • donald1234
        Senior Member
        • Oct 2011
        • 1953
        • 4.1.x

        #4
        Did the actual upgrade complete successfully and in what way are you locked out of admincp, did you delete the install folder?

        Comment


        • kurt@triffetdesi
          kurt@triffetdesi commented
          Editing a comment
          I'm no expert, but I wouldn't be getting timezone errors if upgrade didn't go correctly. Install was deleted immediately.
          The TZ errors appear on the main page, above the forum home page and take the place of the admin CP page (text on white background) when I try to log in there.

        • donald1234
          donald1234 commented
          Editing a comment
          Without a link to your forum we would just be guessing.
      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24287
        • 6.0.X

        #5
        Please follow the instructions in this specific post: http://www.vbulletin.com/forum/forum...66#post4000466
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment


        • kurt@triffetdesi
          kurt@triffetdesi commented
          Editing a comment
          Mark! Have you read anything I've posted?
      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #6
        The date issue is because your webhost has not configured PHP properly. If they take the time to, it'll be fixed.

        Comment

        • kurt@triffetdesi
          Senior Member
          • Mar 2008
          • 120

          #7
          Donald, can you help me out here? You seem to be the only one offering helpful solutions.

          BTW- this is web.com's response:
          Thank you for contacting Technical Support regarding design help. We apologize for any inconvenience this may have caused you. You will need to adjust sentences length. In order to get help with design you will need to sign up for our "My time support". They will be able to walk you through or make change to your site. It will cost $10 for the first 30 minutes. If you would like to sign up for MyTime Support, then please let us know if we can use the card on file. If not we will need the card number and the expiration date of the card. Please contact us should you have additional issues or questions.

          Comment

          • donald1234
            Senior Member
            • Oct 2011
            • 1953
            • 4.1.x

            #8
            You should point your webhost to this thread, this is not a design issue but rather a basic server configuration issue. If your webhost is neither willing or able to address the issue (for free) perhaps you should be looking at another host, having said that it is my opinion that the timezone issue should not interfere with the upgrade process or prevent you from accessing your admincp, that is why I have repeatedly asked for your forums url so that I can see for myself what is or isn't happening.

            PS compared to the support staff on here, I am but an amateur, you should listen to what they say.
            Last edited by donald1234; Thu 17 Apr '14, 7:32am.

            Comment

          • Zachery
            Former vBulletin Support
            • Jul 2002
            • 59097

            #9
            There is a reason we keep telling you that this is an issue with your webhost, because it is.

            You can try adding this to your config.php file

            PHP Code:
            date_default_timezone_set("UTC"); 
            However, that will only help if its an allowed function, and it doesn't solve the issue that your webhost has PHP configured badly.

            PLease, find a better webhost.

            Comment


            • kurt@triffetdesi
              kurt@triffetdesi commented
              Editing a comment
              It's one of the largest web hosting companies in the U.S. I had 4.1 running on another site no problem, but shut it down and transferred license over to this
              http://www.renaultclub.us/letstalk.
              They say the PHP is configured properly and that anything I want done to it falls under the realm of custom design.

              date_default_timezone_set("UTC"); does not work
              Last edited by kurt@triffetdesi; Thu 17 Apr '14, 7:55am.
          • kurt@triffetdesi
            Senior Member
            • Mar 2008
            • 120

            #10
            Let's approach it another way. I am locked out of the admin CP because of this issue so if I go back to 3.8.1 and get into admin CP, is there anything I can look for in there to remove to see if we can get the define('SKIP_ALL_ERRORS', true);
            to function?
            If so, I can reload the 4.2.2 folder and try and give it one last try.

            I currently am using these 3 and none do anything:

            define('SKIP_ALL_ERRORS', true);
            define('DISABLE_HOOKS', true);
            ini_set('display_errors', 'Off');

            What could be overriding these commands? I removed the Mobiquo Tapatalk plugin folder, and that was the only plugin I was using.

            Since the forum has been down for two days, I need to get it back up, so barring any magic solutions, it might be prudent to go back to 3.8.1
            BTW- any chance I can just upgrade from 3.8.1 to 4.1 which doesn't have this problem?

            Comment

            • donald1234
              Senior Member
              • Oct 2011
              • 1953
              • 4.1.x

              #11
              I can access your admincp at this url http://www.renaultclub.us/letstalk/admincp/index.php is it a log in issue you are having?

              You will need a backup to go back now.

              Comment


              • kurt@triffetdesi
                kurt@triffetdesi commented
                Editing a comment
                It's after the login, that I can't access. The error messages replace the index.php page that I would normally get after login. Can I PM you admin access to take a look?
                BTW- I did a full back up of 3.8.1 folder, so it will be easy to go back.
            • Zachery
              Former vBulletin Support
              • Jul 2002
              • 59097

              #12
              The biggest webhosts, tend to be the worst. If you're still getting date errors, your webhost is COMPLETELY AND TOTALLY WRONG. They need to fix this.

              Comment


              • kurt@triffetdesi
                kurt@triffetdesi commented
                Editing a comment
                They say one thing, you say another.
                Did forward this thread to them, and if they respond, I'll post it.
            • Wayne Luke
              vBulletin Technical Support Lead
              • Aug 2000
              • 74129

              #13
              Originally posted by kurt@triffetdesi
              Let's approach it another way. I am locked out of the admin CP because of this issue so if I go back to 3.8.1 and get into admin CP, is there anything I can look for in there to remove to see if we can get the define('SKIP_ALL_ERRORS', true);
              to function?
              If so, I can reload the 4.2.2 folder and try and give it one last try.

              I currently am using these 3 and none do anything:

              define('SKIP_ALL_ERRORS', true);
              define('DISABLE_HOOKS', true);
              ini_set('display_errors', 'Off');

              What could be overriding these commands? I removed the Mobiquo Tapatalk plugin folder, and that was the only plugin I was using.

              Since the forum has been down for two days, I need to get it back up, so barring any magic solutions, it might be prudent to go back to 3.8.1
              BTW- any chance I can just upgrade from 3.8.1 to 4.1 which doesn't have this problem?
              From the PHP website:
              Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate aE_NOTICE if the timezone isn't valid, and/or a E_WARNING message if using the system settings or the TZ environment variable.
              ​Normally this will be set in the PHP.INI file by the server administrator. This would be your webhost. The PHP.INI is the best place to account for the Timezone. It is not set in a default installation of PHP though.

              Prior to vBulletin 4.2.2, there was a bug in the error reporting functions of vBulletin. This bug goes back a long time, back to the 3.X series. It didn't report many newer types of warnings unless the forum was in debug mode. This was fixed in 4.2.2 because we cannot test the software for release in debug mode but needed to see these messages.

              The SKIP_ALL_ERRORS line should return this previously incorrect functionality to 4.2.2. However the TIMEZONE is a default setting. So unless you add the line below to your config.php or have your host properly configure PHP then it will continue to happen. We're not reprogramming PHP to fix this.

              date_default_timezone_set("UTC");

              We can continue arguing about this or you could resolve the problem by adding the line above to your config.php file.
              Translations provided by Google.

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

              Comment


              • Wayne Luke
                Wayne Luke commented
                Editing a comment
                Then you need to find a new hosting provider. There is nothing additional that we can do to fix this.

              • kurt@triffetdesi
                kurt@triffetdesi commented
                Editing a comment
                What is blocking the commands?

              • Wayne Luke
                Wayne Luke commented
                Editing a comment
                Your host can define any PHP function as blocked in the server configuration. It is the only thing that I can think of that would block it.

                As stated above just because a host is large, it doesn't make them a good host.
            • kurt@triffetdesi
              Senior Member
              • Mar 2008
              • 120

              #14
              This was the response from web.com:

              Thank you for contacting Technical Support regarding php. We apologize for any inconvenience this may have caused you.

              Because weve implemented php as a CGI, you cant change php runtime settings via the php_value and php_flag directives in an .htaccess file. To change php runtime settings, you can either use ini_set in your code, or write a wrapper cgi which specifies the configuration file. You would need to set the Timezone for PHP in a php.ini file

              To use a custom php.ini file:

              Enter the following commands to copy the systems default php.ini into your home directory:
              cp /etc/php.ini ~/

              Enter the following command to create a cgi wrapper named php.cgi in your cgi-bin directory containing the following lines:
              #!/bin/sh
              exec /var/www/cgi-bin/php -c ~/php.ini

              Enter the following command to set the executable bit on your wrapper:
              chmod +x php.cgi

              Add an .htaccess file to the directory in which you want to use the settings. The .htaccess file should contain the following lines:
              AddHandler application/my-php .php
              Action application/my-php /cgi-bin/php.cgi

              Change any settings you need in the php.ini file in your home dire ctory and use phpinfo to ensure that theyre set.
              _________________________________

              Guys, I have a little code knowledge, but this is bordering on eye-glazing nerd-speak
              for me, so my only real recourse is to ditch 4.2.2 and go back to 3.8.1

              This has been a huge time waster and I need to move on.


              Comment

              • donald1234
                Senior Member
                • Oct 2011
                • 1953
                • 4.1.x

                #15
                Seems to me that instead of updating php.ini globally on the server your host has enabled ssh for your account so that you can create a custom one but as you say if you are not used to working from the command line you have little chance of completing that task.

                Comment

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